diff options
Diffstat (limited to 'init/do_mounts.c')
-rw-r--r-- | init/do_mounts.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/init/do_mounts.c b/init/do_mounts.c index 53cb37b66227..9634ecf3743d 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c | |||
@@ -627,20 +627,17 @@ out: | |||
627 | } | 627 | } |
628 | 628 | ||
629 | static bool is_tmpfs; | 629 | static bool is_tmpfs; |
630 | static struct dentry *rootfs_mount(struct file_system_type *fs_type, | 630 | static int rootfs_init_fs_context(struct fs_context *fc) |
631 | int flags, const char *dev_name, void *data) | ||
632 | { | 631 | { |
633 | void *fill = ramfs_fill_super; | ||
634 | |||
635 | if (IS_ENABLED(CONFIG_TMPFS) && is_tmpfs) | 632 | if (IS_ENABLED(CONFIG_TMPFS) && is_tmpfs) |
636 | fill = shmem_fill_super; | 633 | return shmem_init_fs_context(fc); |
637 | 634 | ||
638 | return mount_nodev(fs_type, flags, data, fill); | 635 | return ramfs_init_fs_context(fc); |
639 | } | 636 | } |
640 | 637 | ||
641 | struct file_system_type rootfs_fs_type = { | 638 | struct file_system_type rootfs_fs_type = { |
642 | .name = "rootfs", | 639 | .name = "rootfs", |
643 | .mount = rootfs_mount, | 640 | .init_fs_context = rootfs_init_fs_context, |
644 | .kill_sb = kill_litter_super, | 641 | .kill_sb = kill_litter_super, |
645 | }; | 642 | }; |
646 | 643 | ||