From df02450217c98e01b8b22f805314470df71f2b9b Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sat, 1 Jun 2019 18:51:15 -0400 Subject: make ramfs_fill_super() static all users should just call ramfs_mount() Signed-off-by: Al Viro --- fs/ramfs/inode.c | 2 +- include/linux/ramfs.h | 2 -- init/do_mounts.c | 6 ++---- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c index 733c6b4193dc..b85d1e77e934 100644 --- a/fs/ramfs/inode.c +++ b/fs/ramfs/inode.c @@ -217,7 +217,7 @@ static int ramfs_parse_options(char *data, struct ramfs_mount_opts *opts) return 0; } -int ramfs_fill_super(struct super_block *sb, void *data, int silent) +static int ramfs_fill_super(struct super_block *sb, void *data, int silent) { struct ramfs_fs_info *fsi; struct inode *inode; diff --git a/include/linux/ramfs.h b/include/linux/ramfs.h index ee582bdb7fda..e4d7d141545e 100644 --- a/include/linux/ramfs.h +++ b/include/linux/ramfs.h @@ -20,6 +20,4 @@ extern int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize); extern const struct file_operations ramfs_file_operations; extern const struct vm_operations_struct generic_file_vm_ops; -int ramfs_fill_super(struct super_block *sb, void *data, int silent); - #endif diff --git a/init/do_mounts.c b/init/do_mounts.c index 53cb37b66227..baedc2ef579e 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -630,12 +630,10 @@ static bool is_tmpfs; static struct dentry *rootfs_mount(struct file_system_type *fs_type, int flags, const char *dev_name, void *data) { - void *fill = ramfs_fill_super; - if (IS_ENABLED(CONFIG_TMPFS) && is_tmpfs) - fill = shmem_fill_super; + return mount_nodev(fs_type, flags, data, shmem_fill_super); - return mount_nodev(fs_type, flags, data, fill); + return ramfs_mount(fs_type, flags, dev_name, data); } struct file_system_type rootfs_fs_type = { -- cgit v1.2.3-58-ga151