X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=init%2Fdo_mounts.c;h=eb410083e8e075f9ca1829d0db1bf3cb70d17139;hb=dfdb3c4d18221c5c66a1bfecb76c25b3f95275e8;hp=9b3565c41502af7bd9198f9a378c3a5cc7562423;hpb=3d430bdb74140224d90dd6253d67ff71d181cf64;p=firefly-linux-kernel-4.4.55.git diff --git a/init/do_mounts.c b/init/do_mounts.c index 9b3565c41502..eb410083e8e0 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -395,8 +395,6 @@ retry: case 0: goto out; case -EACCES: - flags |= MS_RDONLY; - goto retry; case -EINVAL: continue; } @@ -419,6 +417,10 @@ retry: #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();