]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - init/do_mounts.c
btrfs: add missing run of delayed items after unlink during log replay
[mirror_ubuntu-jammy-kernel.git] / init / do_mounts.c
index 762b534978d95d3bed72f8b2f3323572db6b1e0a..5bea810b071050ceb3f596bfee68b613321336a2 100644 (file)
@@ -600,6 +600,8 @@ void __init mount_root(void)
  */
 void __init prepare_namespace(void)
 {
+       int err;
+
        if (root_delay) {
                printk(KERN_INFO "Waiting %d sec before mounting root device...\n",
                       root_delay);
@@ -647,6 +649,13 @@ out:
        devtmpfs_mount();
        init_mount(".", "/", NULL, MS_MOVE, NULL);
        init_chroot(".");
+#ifdef CONFIG_BLOCK
+       /* recreate the /dev/root */
+       err = create_dev("/dev/root", ROOT_DEV);
+
+       if (err < 0)
+               pr_emerg("Failed to create /dev/root: %d\n", err);
+#endif
 }
 
 static bool is_tmpfs;