Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

Since commit 853ac43ab194 ("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 <axel.lin@ingics.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Axel Lin and committed by
Linus Torvalds
0fa9aa20 7a5f4f1c

+8 -9
+8 -2
fs/ramfs/file-nommu.c
··· 27 27 #include "internal.h" 28 28 29 29 static int ramfs_nommu_setattr(struct dentry *, struct iattr *); 30 + static unsigned long ramfs_nommu_get_unmapped_area(struct file *file, 31 + unsigned long addr, 32 + unsigned long len, 33 + unsigned long pgoff, 34 + unsigned long flags); 35 + static int ramfs_nommu_mmap(struct file *file, struct vm_area_struct *vma); 30 36 31 37 const struct address_space_operations ramfs_aops = { 32 38 .readpage = simple_readpage, ··· 203 197 * - the pages to be mapped must exist 204 198 * - the pages be physically contiguous in sequence 205 199 */ 206 - unsigned long ramfs_nommu_get_unmapped_area(struct file *file, 200 + static unsigned long ramfs_nommu_get_unmapped_area(struct file *file, 207 201 unsigned long addr, unsigned long len, 208 202 unsigned long pgoff, unsigned long flags) 209 203 { ··· 262 256 /* 263 257 * set up a mapping for shared memory segments 264 258 */ 265 - int ramfs_nommu_mmap(struct file *file, struct vm_area_struct *vma) 259 + static int ramfs_nommu_mmap(struct file *file, struct vm_area_struct *vma) 266 260 { 267 261 if (!(vma->vm_flags & VM_SHARED)) 268 262 return -ENOSYS;
-7
include/linux/ramfs.h
··· 14 14 } 15 15 #else 16 16 extern int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize); 17 - extern unsigned long ramfs_nommu_get_unmapped_area(struct file *file, 18 - unsigned long addr, 19 - unsigned long len, 20 - unsigned long pgoff, 21 - unsigned long flags); 22 - 23 - extern int ramfs_nommu_mmap(struct file *file, struct vm_area_struct *vma); 24 17 #endif 25 18 26 19 extern const struct file_operations ramfs_file_operations;