diff --git a/init/do_mounts.c b/init/do_mounts.c
index 9b3565c41502af7bd9198f9a378c3a5cc7562423..eb410083e8e075f9ca1829d0db1bf3cb70d17139 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -395,8 +395,6 @@ void __init mount_block_root(char *name, int flags)
 			case 0:
 				goto out;
 			case -EACCES:
-				flags |= MS_RDONLY;
-				goto retry;
 			case -EINVAL:
 				continue;
 		}
@@ -419,6 +417,10 @@ void __init mount_block_root(char *name, int flags)
 #endif
 		panic("VFS: Unable to mount root fs on %s", b);
 	}
+	if (!(flags & MS_RDONLY)) {
+		flags |= MS_RDONLY;
+		goto retry;
+	}
 
 	printk("List of all partitions:\n");
 	printk_all_partitions();