Skip to content

Commit 0fa9aa2

Browse files
AxelLintorvalds
authored andcommitted
fs/ramfs/file-nommu.c: make ramfs_nommu_get_unmapped_area() and ramfs_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 <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>
1 parent 7a5f4f1 commit 0fa9aa2

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

‎fs/ramfs/file-nommu.c‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@
2727
#include "internal.h"
2828

2929
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);
3036

3137
const struct address_space_operations ramfs_aops = {
3238
.readpage = simple_readpage,
@@ -197,7 +203,7 @@ static int ramfs_nommu_setattr(struct dentry *dentry, struct iattr *ia)
197203
* - the pages to be mapped must exist
198204
* - the pages be physically contiguous in sequence
199205
*/
200-
unsigned long ramfs_nommu_get_unmapped_area(struct file *file,
206+
static unsigned long ramfs_nommu_get_unmapped_area(struct file *file,
201207
unsigned long addr, unsigned long len,
202208
unsigned long pgoff, unsigned long flags)
203209
{
@@ -256,7 +262,7 @@ unsigned long ramfs_nommu_get_unmapped_area(struct file *file,
256262
/*
257263
* set up a mapping for shared memory segments
258264
*/
259-
int ramfs_nommu_mmap(struct file *file, struct vm_area_struct *vma)
265+
static int ramfs_nommu_mmap(struct file *file, struct vm_area_struct *vma)
260266
{
261267
if (!(vma->vm_flags & VM_SHARED))
262268
return -ENOSYS;

‎include/linux/ramfs.h‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,6 @@ ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize)
1414
}
1515
#else
1616
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);
2417
#endif
2518

2619
extern const struct file_operations ramfs_file_operations;

0 commit comments

Comments
 (0)