9p/virtio, virtiofs, and others can be mounted with no block device or
userspace helpers.
Signed-off-by: Alex Xu (Hello71) <[email protected]>
---
init/do_mounts.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/init/do_mounts.c b/init/do_mounts.c
index b5f9604d0c98..8aa38ec0bfec 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -568,7 +568,7 @@ void __init mount_root(void)
}
#endif
#ifdef CONFIG_BLOCK
- {
+ if (ROOT_DEV != 0) {
int err = create_dev("/dev/root", ROOT_DEV);
if (err < 0)
@@ -576,6 +576,7 @@ void __init mount_root(void)
mount_block_root("/dev/root", root_mountflags);
}
#endif
+ mount_block_root(saved_root_name, root_mountflags);
}
/*
--
2.29.2