Skip to content

Commit

Permalink
mm/shmem.c: make 3 functions static
Browse files Browse the repository at this point in the history
This patch makes three needlessly global functions static.

Signed-off-by: Adrian Bunk <[email protected]>
Cc: Hugh Dickins <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
AdrianBunk authored and Linus Torvalds committed Oct 16, 2007
1 parent af767cb commit d8dc74f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 20 deletions.
15 changes: 0 additions & 15 deletions include/linux/mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -648,28 +648,13 @@ static inline int page_mapped(struct page *page)
extern void show_free_areas(void);

#ifdef CONFIG_SHMEM
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
static inline int shmem_lock(struct file *file, int lock,
struct user_struct *user)
{
return 0;
}

static inline int shmem_set_policy(struct vm_area_struct *vma,
struct mempolicy *new)
{
return 0;
}

static inline struct mempolicy *shmem_get_policy(struct vm_area_struct *vma,
unsigned long addr)
{
return NULL;
}
#endif
struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags);

Expand Down
10 changes: 5 additions & 5 deletions mm/shmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -1026,8 +1026,8 @@ static struct page *shmem_swapin_async(struct shared_policy *p,
return page;
}

struct page *shmem_swapin(struct shmem_inode_info *info, swp_entry_t entry,
unsigned long idx)
static struct page *shmem_swapin(struct shmem_inode_info *info,
swp_entry_t entry, unsigned long idx)
{
struct shared_policy *p = &info->policy;
int i, num;
Expand Down Expand Up @@ -1329,14 +1329,14 @@ static int shmem_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
}

#ifdef CONFIG_NUMA
int shmem_set_policy(struct vm_area_struct *vma, struct mempolicy *new)
static int shmem_set_policy(struct vm_area_struct *vma, struct mempolicy *new)
{
struct inode *i = vma->vm_file->f_path.dentry->d_inode;
return mpol_set_shared_policy(&SHMEM_I(i)->policy, vma, new);
}

struct mempolicy *
shmem_get_policy(struct vm_area_struct *vma, unsigned long addr)
static struct mempolicy *shmem_get_policy(struct vm_area_struct *vma,
unsigned long addr)
{
struct inode *i = vma->vm_file->f_path.dentry->d_inode;
unsigned long idx;
Expand Down

0 comments on commit d8dc74f

Please sign in to comment.