aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2007-10-16 04:26:26 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 12:43:03 -0400
commitd8dc74f212c38407fc9f4367181f8f969b719485 (patch)
tree2ff1ec0aaee1e6b3ee29d258a7158deb4b43688c
parentaf767cbdd78f293485c294113885d95e7f1da123 (diff)
mm/shmem.c: make 3 functions static
This patch makes three needlessly global functions static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Cc: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--include/linux/mm.h15
-rw-r--r--mm/shmem.c10
2 files changed, 5 insertions, 20 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index cc551f06728b..7e87e1b1662e 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -648,9 +648,6 @@ static inline int page_mapped(struct page *page)
648extern void show_free_areas(void); 648extern void show_free_areas(void);
649 649
650#ifdef CONFIG_SHMEM 650#ifdef CONFIG_SHMEM
651int shmem_set_policy(struct vm_area_struct *vma, struct mempolicy *new);
652struct mempolicy *shmem_get_policy(struct vm_area_struct *vma,
653 unsigned long addr);
654int shmem_lock(struct file *file, int lock, struct user_struct *user); 651int shmem_lock(struct file *file, int lock, struct user_struct *user);
655#else 652#else
656static inline int shmem_lock(struct file *file, int lock, 653static inline int shmem_lock(struct file *file, int lock,
@@ -658,18 +655,6 @@ static inline int shmem_lock(struct file *file, int lock,
658{ 655{
659 return 0; 656 return 0;
660} 657}
661
662static inline int shmem_set_policy(struct vm_area_struct *vma,
663 struct mempolicy *new)
664{
665 return 0;
666}
667
668static inline struct mempolicy *shmem_get_policy(struct vm_area_struct *vma,
669 unsigned long addr)
670{
671 return NULL;
672}
673#endif 658#endif
674struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags); 659struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags);
675 660
diff --git a/mm/shmem.c b/mm/shmem.c
index 76ecbac0d55b..8a82342a8595 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -1026,8 +1026,8 @@ static struct page *shmem_swapin_async(struct shared_policy *p,
1026 return page; 1026 return page;
1027} 1027}
1028 1028
1029struct page *shmem_swapin(struct shmem_inode_info *info, swp_entry_t entry, 1029static struct page *shmem_swapin(struct shmem_inode_info *info,
1030 unsigned long idx) 1030 swp_entry_t entry, unsigned long idx)
1031{ 1031{
1032 struct shared_policy *p = &info->policy; 1032 struct shared_policy *p = &info->policy;
1033 int i, num; 1033 int i, num;
@@ -1329,14 +1329,14 @@ static int shmem_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
1329} 1329}
1330 1330
1331#ifdef CONFIG_NUMA 1331#ifdef CONFIG_NUMA
1332int shmem_set_policy(struct vm_area_struct *vma, struct mempolicy *new) 1332static int shmem_set_policy(struct vm_area_struct *vma, struct mempolicy *new)
1333{ 1333{
1334 struct inode *i = vma->vm_file->f_path.dentry->d_inode; 1334 struct inode *i = vma->vm_file->f_path.dentry->d_inode;
1335 return mpol_set_shared_policy(&SHMEM_I(i)->policy, vma, new); 1335 return mpol_set_shared_policy(&SHMEM_I(i)->policy, vma, new);
1336} 1336}
1337 1337
1338struct mempolicy * 1338static struct mempolicy *shmem_get_policy(struct vm_area_struct *vma,
1339shmem_get_policy(struct vm_area_struct *vma, unsigned long addr) 1339 unsigned long addr)
1340{ 1340{
1341 struct inode *i = vma->vm_file->f_path.dentry->d_inode; 1341 struct inode *i = vma->vm_file->f_path.dentry->d_inode;
1342 unsigned long idx; 1342 unsigned long idx;