Merge tag 'iwlwifi-next-for-kalle-2014-12-30' of https://git.kernel.org/pub/scm/linux...
[cascardo/linux.git] / init / do_mounts.c
index 9b3565c..eb41008 100644 (file)
@@ -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();