1From f0e932ba0aa10ec7df49b4780c63cb94e95fed60 Mon Sep 17 00:00:00 2001
2From: Jeffy Chen <jeffy.chen@rock-chips.com>
3Date: Fri, 9 Nov 2018 12:14:29 +0800
4Subject: [PATCH 1/3] init/do_mounts.c: Retry all fs after failed to mount with
5 "rootfstype="
6
7Retry all filesystems when failed to mount with specified ones.
8
9Change-Id: Ic1b794cc61d61f1d0715e3b32400b3e96b0dddea
10Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
11---
12 init/do_mounts.c | 9 +++++++++
13 1 file changed, 9 insertions(+)
14
15diff --git a/init/do_mounts.c b/init/do_mounts.c
16index e1c9afa9d8c9..3be38b2c9143 100644
17--- a/init/do_mounts.c
18+++ b/init/do_mounts.c
19@@ -420,6 +420,15 @@ void __init mount_block_root(char *name, int flags)
20 	for (p = fs_names; *p; p += strlen(p)+1)
21 		printk(" %s", p);
22 	printk("\n");
23+
24+	/* Retry all filesystems when failed to mount with specified ones */
25+	if (root_fs_names) {
26+		printk("Retrying all filesystems\n");
27+		root_fs_names = NULL;
28+		get_fs_names(fs_names);
29+		goto retry;
30+	}
31+
32 #ifdef CONFIG_BLOCK
33 	__bdevname(ROOT_DEV, b);
34 #endif
35--
362.20.1
37
38