]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - init/do_mounts.c
Merge tag 'timers-core-2020-03-30' of git://git.kernel.org/pub/scm/linux/kernel/git...
[mirror_ubuntu-jammy-kernel.git] / init / do_mounts.c
index 0ae9cc22f2ae255c55337812b121a9a2d2eec9ca..29d326b6c29d2d05b05adf647e1f38bb1bef07d1 100644 (file)
@@ -429,12 +429,10 @@ void __init mount_block_root(char *name, int flags)
        struct page *page = alloc_page(GFP_KERNEL);
        char *fs_names = page_address(page);
        char *p;
-#ifdef CONFIG_BLOCK
        char b[BDEVNAME_SIZE];
-#else
-       const char *b = name;
-#endif
 
+       scnprintf(b, BDEVNAME_SIZE, "unknown-block(%u,%u)",
+                 MAJOR(ROOT_DEV), MINOR(ROOT_DEV));
        get_fs_names(fs_names);
 retry:
        for (p = fs_names; *p; p += strlen(p)+1) {
@@ -451,9 +449,6 @@ retry:
                 * and bad superblock on root device.
                 * and give them a list of the available devices
                 */
-#ifdef CONFIG_BLOCK
-               __bdevname(ROOT_DEV, b);
-#endif
                printk("VFS: Cannot open root device \"%s\" or %s: error %d\n",
                                root_device_name, b, err);
                printk("Please append a correct \"root=\" boot option; here are the available partitions:\n");
@@ -476,9 +471,6 @@ retry:
        for (p = fs_names; *p; p += strlen(p)+1)
                printk(" %s", p);
        printk("\n");
-#ifdef CONFIG_BLOCK
-       __bdevname(ROOT_DEV, b);
-#endif
        panic("VFS: Unable to mount root fs on %s", b);
 out:
        put_page(page);