aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/mm.h5
-rw-r--r--mm/shmem.c5
-rw-r--r--mm/tiny-shmem.c2
3 files changed, 5 insertions, 7 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index a0eec16eb0bd..60e0e4a592d2 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -660,15 +660,11 @@ static inline int page_mapped(struct page *page)
660extern void show_free_areas(void); 660extern void show_free_areas(void);
661 661
662#ifdef CONFIG_SHMEM 662#ifdef CONFIG_SHMEM
663struct page *shmem_nopage(struct vm_area_struct *vma,
664 unsigned long address, int *type);
665int shmem_set_policy(struct vm_area_struct *vma, struct mempolicy *new); 663int shmem_set_policy(struct vm_area_struct *vma, struct mempolicy *new);
666struct mempolicy *shmem_get_policy(struct vm_area_struct *vma, 664struct mempolicy *shmem_get_policy(struct vm_area_struct *vma,
667 unsigned long addr); 665 unsigned long addr);
668int shmem_lock(struct file *file, int lock, struct user_struct *user); 666int shmem_lock(struct file *file, int lock, struct user_struct *user);
669#else 667#else
670#define shmem_nopage filemap_nopage
671
672static inline int shmem_lock(struct file *file, int lock, 668static inline int shmem_lock(struct file *file, int lock,
673 struct user_struct *user) 669 struct user_struct *user)
674{ 670{
@@ -688,7 +684,6 @@ static inline struct mempolicy *shmem_get_policy(struct vm_area_struct *vma,
688} 684}
689#endif 685#endif
690struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags); 686struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags);
691extern int shmem_mmap(struct file *file, struct vm_area_struct *vma);
692 687
693int shmem_zero_setup(struct vm_area_struct *); 688int shmem_zero_setup(struct vm_area_struct *);
694 689
diff --git a/mm/shmem.c b/mm/shmem.c
index 882053031aa0..fcb07882c8e0 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -1228,7 +1228,8 @@ failed:
1228 return error; 1228 return error;
1229} 1229}
1230 1230
1231struct page *shmem_nopage(struct vm_area_struct *vma, unsigned long address, int *type) 1231static struct page *shmem_nopage(struct vm_area_struct *vma,
1232 unsigned long address, int *type)
1232{ 1233{
1233 struct inode *inode = vma->vm_file->f_path.dentry->d_inode; 1234 struct inode *inode = vma->vm_file->f_path.dentry->d_inode;
1234 struct page *page = NULL; 1235 struct page *page = NULL;
@@ -1335,7 +1336,7 @@ out_nomem:
1335 return retval; 1336 return retval;
1336} 1337}
1337 1338
1338int shmem_mmap(struct file *file, struct vm_area_struct *vma) 1339static int shmem_mmap(struct file *file, struct vm_area_struct *vma)
1339{ 1340{
1340 file_accessed(file); 1341 file_accessed(file);
1341 vma->vm_ops = &shmem_vm_ops; 1342 vma->vm_ops = &shmem_vm_ops;
diff --git a/mm/tiny-shmem.c b/mm/tiny-shmem.c
index c7f6e1914bc4..8803471593fd 100644
--- a/mm/tiny-shmem.c
+++ b/mm/tiny-shmem.c
@@ -126,6 +126,7 @@ int shmem_unuse(swp_entry_t entry, struct page *page)
126 return 0; 126 return 0;
127} 127}
128 128
129#if 0
129int shmem_mmap(struct file *file, struct vm_area_struct *vma) 130int shmem_mmap(struct file *file, struct vm_area_struct *vma)
130{ 131{
131 file_accessed(file); 132 file_accessed(file);
@@ -135,6 +136,7 @@ int shmem_mmap(struct file *file, struct vm_area_struct *vma)
135 return 0; 136 return 0;
136#endif 137#endif
137} 138}
139#endif /* 0 */
138 140
139#ifndef CONFIG_MMU 141#ifndef CONFIG_MMU
140unsigned long shmem_get_unmapped_area(struct file *file, 142unsigned long shmem_get_unmapped_area(struct file *file,