summaryrefslogtreecommitdiffstats
path: root/init/do_mounts.c
diff options
context:
space:
mode:
Diffstat (limited to 'init/do_mounts.c')
-rw-r--r--init/do_mounts.c11
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
629static bool is_tmpfs; 629static bool is_tmpfs;
630static struct dentry *rootfs_mount(struct file_system_type *fs_type, 630static 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
641struct file_system_type rootfs_fs_type = { 638struct 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