From: Al Viro Date: Sat, 1 Jun 2019 22:56:53 +0000 (-0400) Subject: make shmem_fill_super() static X-Git-Tag: v5.4-rc1~43^2~13 X-Git-Url: http://git.samba.org/samba.git/?p=sfrench%2Fcifs-2.6.git;a=commitdiff_plain;h=7e30d2a5eb0b2d5853f06cb8a2d44937d80a6bd6;ds=sidebyside make shmem_fill_super() static ... have callers use shmem_mount() Signed-off-by: Al Viro --- diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c index bafdf86b0497..dabf5006a254 100644 --- a/drivers/base/devtmpfs.c +++ b/drivers/base/devtmpfs.c @@ -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 diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h index 20d815a33145..88cb98b0e49b 100644 --- a/include/linux/shmem_fs.h +++ b/include/linux/shmem_fs.h @@ -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, diff --git a/init/do_mounts.c b/init/do_mounts.c index baedc2ef579e..16c29e57f224 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -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); } diff --git a/mm/shmem.c b/mm/shmem.c index 2bed4761f279..40f574c06375 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -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; @@ -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);