Skip to content

Commit

Permalink
[PATCH] mm/{,tiny-}shmem.c cleanups
Browse files Browse the repository at this point in the history
shmem_{nopage,mmap} are no longer used in ipc/shm.c

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
AdrianBunk authored and Linus Torvalds committed Mar 1, 2007
1 parent de01bad commit 9b83a6a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
5 changes: 0 additions & 5 deletions include/linux/mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -660,15 +660,11 @@ static inline int page_mapped(struct page *page)
extern void show_free_areas(void);

#ifdef CONFIG_SHMEM
struct page *shmem_nopage(struct vm_area_struct *vma,
unsigned long address, int *type);
int shmem_set_policy(struct vm_area_struct *vma, struct mempolicy *new);
struct mempolicy *shmem_get_policy(struct vm_area_struct *vma,
unsigned long addr);
int shmem_lock(struct file *file, int lock, struct user_struct *user);
#else
#define shmem_nopage filemap_nopage

static inline int shmem_lock(struct file *file, int lock,
struct user_struct *user)
{
Expand All @@ -688,7 +684,6 @@ static inline struct mempolicy *shmem_get_policy(struct vm_area_struct *vma,
}
#endif
struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags);
extern int shmem_mmap(struct file *file, struct vm_area_struct *vma);

int shmem_zero_setup(struct vm_area_struct *);

Expand Down
5 changes: 3 additions & 2 deletions mm/shmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,8 @@ static int shmem_getpage(struct inode *inode, unsigned long idx,
return error;
}

struct page *shmem_nopage(struct vm_area_struct *vma, unsigned long address, int *type)
static struct page *shmem_nopage(struct vm_area_struct *vma,
unsigned long address, int *type)
{
struct inode *inode = vma->vm_file->f_path.dentry->d_inode;
struct page *page = NULL;
Expand Down Expand Up @@ -1335,7 +1336,7 @@ int shmem_lock(struct file *file, int lock, struct user_struct *user)
return retval;
}

int shmem_mmap(struct file *file, struct vm_area_struct *vma)
static int shmem_mmap(struct file *file, struct vm_area_struct *vma)
{
file_accessed(file);
vma->vm_ops = &shmem_vm_ops;
Expand Down
2 changes: 2 additions & 0 deletions mm/tiny-shmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ int shmem_unuse(swp_entry_t entry, struct page *page)
return 0;
}

#if 0
int shmem_mmap(struct file *file, struct vm_area_struct *vma)
{
file_accessed(file);
Expand All @@ -135,6 +136,7 @@ int shmem_mmap(struct file *file, struct vm_area_struct *vma)
return 0;
#endif
}
#endif /* 0 */

#ifndef CONFIG_MMU
unsigned long shmem_get_unmapped_area(struct file *file,
Expand Down

0 comments on commit 9b83a6a

Please sign in to comment.