Commit 0fa9aa20 authored by Axel Lin's avatar Axel Lin Committed by Linus Torvalds

fs/ramfs/file-nommu.c: make ramfs_nommu_get_unmapped_area() and ramfs_nommu_mmap() static

Since commit 853ac43a ("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: default avatarAxel Lin <axel.lin@ingics.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 7a5f4f1c
...@@ -27,6 +27,12 @@ ...@@ -27,6 +27,12 @@
#include "internal.h" #include "internal.h"
static int ramfs_nommu_setattr(struct dentry *, struct iattr *); 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 = { const struct address_space_operations ramfs_aops = {
.readpage = simple_readpage, .readpage = simple_readpage,
...@@ -197,7 +203,7 @@ static int ramfs_nommu_setattr(struct dentry *dentry, struct iattr *ia) ...@@ -197,7 +203,7 @@ static int ramfs_nommu_setattr(struct dentry *dentry, struct iattr *ia)
* - the pages to be mapped must exist * - the pages to be mapped must exist
* - the pages be physically contiguous in sequence * - 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 addr, unsigned long len,
unsigned long pgoff, unsigned long flags) unsigned long pgoff, unsigned long flags)
{ {
...@@ -256,7 +262,7 @@ unsigned long ramfs_nommu_get_unmapped_area(struct file *file, ...@@ -256,7 +262,7 @@ unsigned long ramfs_nommu_get_unmapped_area(struct file *file,
/* /*
* set up a mapping for shared memory segments * 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)) if (!(vma->vm_flags & VM_SHARED))
return -ENOSYS; return -ENOSYS;
......
...@@ -14,13 +14,6 @@ ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize) ...@@ -14,13 +14,6 @@ ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize)
} }
#else #else
extern int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize); 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 #endif
extern const struct file_operations ramfs_file_operations; extern const struct file_operations ramfs_file_operations;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment