Skip to content

Commit

Permalink
fs/ramfs/file-nommu.c: make ramfs_nommu_get_unmapped_area() and ramfs…
Browse files Browse the repository at this point in the history
…_nommu_mmap() static

Since commit 853ac43 ("shmem: unify regular and tiny shmem"),
ramfs_nommu_get_unmapped_area() and ramfs_nommu_mmap() are not directly
referenced outside of file-nommu.c.  Thus make them static.

Signed-off-by: Axel Lin <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
AxelLin authored and torvalds committed Jan 24, 2014
1 parent 7a5f4f1 commit 0fa9aa2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
10 changes: 8 additions & 2 deletions fs/ramfs/file-nommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@
#include "internal.h"

static int ramfs_nommu_setattr(struct dentry *, struct iattr *);
static unsigned long ramfs_nommu_get_unmapped_area(struct file *file,
unsigned long addr,
unsigned long len,
unsigned long pgoff,
unsigned long flags);
static int ramfs_nommu_mmap(struct file *file, struct vm_area_struct *vma);

const struct address_space_operations ramfs_aops = {
.readpage = simple_readpage,
Expand Down Expand Up @@ -197,7 +203,7 @@ static int ramfs_nommu_setattr(struct dentry *dentry, struct iattr *ia)
* - the pages to be mapped must exist
* - the pages be physically contiguous in sequence
*/
unsigned long ramfs_nommu_get_unmapped_area(struct file *file,
static unsigned long ramfs_nommu_get_unmapped_area(struct file *file,
unsigned long addr, unsigned long len,
unsigned long pgoff, unsigned long flags)
{
Expand Down Expand Up @@ -256,7 +262,7 @@ unsigned long ramfs_nommu_get_unmapped_area(struct file *file,
/*
* set up a mapping for shared memory segments
*/
int ramfs_nommu_mmap(struct file *file, struct vm_area_struct *vma)
static int ramfs_nommu_mmap(struct file *file, struct vm_area_struct *vma)
{
if (!(vma->vm_flags & VM_SHARED))
return -ENOSYS;
Expand Down
7 changes: 0 additions & 7 deletions include/linux/ramfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize)
}
#else
extern int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize);
extern unsigned long ramfs_nommu_get_unmapped_area(struct file *file,
unsigned long addr,
unsigned long len,
unsigned long pgoff,
unsigned long flags);

extern int ramfs_nommu_mmap(struct file *file, struct vm_area_struct *vma);
#endif

extern const struct file_operations ramfs_file_operations;
Expand Down

0 comments on commit 0fa9aa2

Please sign in to comment.