Skip to content

Commit

Permalink
make shmem_fill_super() static
Browse files Browse the repository at this point in the history
... have callers use shmem_mount()

Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Sep 5, 2019
1 parent df02450 commit 7e30d2a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion drivers/base/devtmpfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ static struct dentry *dev_mount(struct file_system_type *fs_type, int flags,
const char *dev_name, void *data)
{
#ifdef CONFIG_TMPFS
return mount_nodev(fs_type, flags, data, shmem_fill_super);
return shmem_mount(fs_type, flags, dev_name, data);
#else
return ramfs_mount(fs_type, flags, dev_name, data);
#endif
Expand Down
3 changes: 2 additions & 1 deletion include/linux/shmem_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ static inline struct shmem_inode_info *SHMEM_I(struct inode *inode)
* Functions in mm/shmem.c called directly from elsewhere:
*/
extern int shmem_init(void);
extern int shmem_fill_super(struct super_block *sb, void *data, int silent);
extern struct dentry *shmem_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data);
extern struct file *shmem_file_setup(const char *name,
loff_t size, unsigned long flags);
extern struct file *shmem_kernel_file_setup(const char *name, loff_t size,
Expand Down
2 changes: 1 addition & 1 deletion init/do_mounts.c
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ static struct dentry *rootfs_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
if (IS_ENABLED(CONFIG_TMPFS) && is_tmpfs)
return mount_nodev(fs_type, flags, data, shmem_fill_super);
return shmem_mount(fs_type, flags, dev_name, data);

return ramfs_mount(fs_type, flags, dev_name, data);
}
Expand Down
4 changes: 2 additions & 2 deletions mm/shmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -3547,7 +3547,7 @@ static void shmem_put_super(struct super_block *sb)
sb->s_fs_info = NULL;
}

int shmem_fill_super(struct super_block *sb, void *data, int silent)
static int shmem_fill_super(struct super_block *sb, void *data, int silent)
{
struct inode *inode;
struct shmem_sb_info *sbinfo;
Expand Down Expand Up @@ -3759,7 +3759,7 @@ static const struct vm_operations_struct shmem_vm_ops = {
#endif
};

static struct dentry *shmem_mount(struct file_system_type *fs_type,
struct dentry *shmem_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
return mount_nodev(fs_type, flags, data, shmem_fill_super);
Expand Down

0 comments on commit 7e30d2a

Please sign in to comment.