Skip to content

Commit df02450

Browse files
author
Al Viro
committed
make ramfs_fill_super() static
all users should just call ramfs_mount() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent d401727 commit df02450

3 files changed

Lines changed: 3 additions & 7 deletions

File tree

‎fs/ramfs/inode.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ static int ramfs_parse_options(char *data, struct ramfs_mount_opts *opts)
217217
return 0;
218218
}
219219

220-
int ramfs_fill_super(struct super_block *sb, void *data, int silent)
220+
static int ramfs_fill_super(struct super_block *sb, void *data, int silent)
221221
{
222222
struct ramfs_fs_info *fsi;
223223
struct inode *inode;

‎include/linux/ramfs.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,4 @@ extern int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize);
2020
extern const struct file_operations ramfs_file_operations;
2121
extern const struct vm_operations_struct generic_file_vm_ops;
2222

23-
int ramfs_fill_super(struct super_block *sb, void *data, int silent);
24-
2523
#endif

‎init/do_mounts.c‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -630,12 +630,10 @@ static bool is_tmpfs;
630630
static struct dentry *rootfs_mount(struct file_system_type *fs_type,
631631
int flags, const char *dev_name, void *data)
632632
{
633-
void *fill = ramfs_fill_super;
634-
635633
if (IS_ENABLED(CONFIG_TMPFS) && is_tmpfs)
636-
fill = shmem_fill_super;
634+
return mount_nodev(fs_type, flags, data, shmem_fill_super);
637635

638-
return mount_nodev(fs_type, flags, data, fill);
636+
return ramfs_mount(fs_type, flags, dev_name, data);
639637
}
640638

641639
struct file_system_type rootfs_fs_type = {

0 commit comments

Comments
 (0)