Skip to content

Commit

Permalink
make ramfs_fill_super() static
Browse files Browse the repository at this point in the history
all users should just call ramfs_mount()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Sep 5, 2019
1 parent d401727 commit df02450
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion fs/ramfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions include/linux/ramfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 2 additions & 4 deletions init/do_mounts.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit df02450

Please sign in to comment.