new/yocto/meta-rockchip/recipes-kernel/linux/linux-rockchip_4.19/0001-init-do_mounts.c-Retry-all-fs-after-failed-to-mount-.patch

38 lines
1.0 KiB
Diff
Raw Normal View History

2025-05-10 21:58:58 +08:00
From f0e932ba0aa10ec7df49b4780c63cb94e95fed60 Mon Sep 17 00:00:00 2001
From: Jeffy Chen <jeffy.chen@rock-chips.com>
Date: Fri, 9 Nov 2018 12:14:29 +0800
Subject: [PATCH 1/3] init/do_mounts.c: Retry all fs after failed to mount with
"rootfstype="
Retry all filesystems when failed to mount with specified ones.
Change-Id: Ic1b794cc61d61f1d0715e3b32400b3e96b0dddea
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---
init/do_mounts.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/init/do_mounts.c b/init/do_mounts.c
index e1c9afa9d8c9..3be38b2c9143 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -420,6 +420,15 @@ void __init mount_block_root(char *name, int flags)
for (p = fs_names; *p; p += strlen(p)+1)
printk(" %s", p);
printk("\n");
+
+ /* Retry all filesystems when failed to mount with specified ones */
+ if (root_fs_names) {
+ printk("Retrying all filesystems\n");
+ root_fs_names = NULL;
+ get_fs_names(fs_names);
+ goto retry;
+ }
+
#ifdef CONFIG_BLOCK
__bdevname(ROOT_DEV, b);
#endif
--
2.20.1