public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] init/do_mounts.c: treat EROFS like EACCES
@ 2014-06-18 16:12 Philippe De Muyter
  2014-06-19 21:19 ` Andrew Morton
  0 siblings, 1 reply; 11+ messages in thread
From: Philippe De Muyter @ 2014-06-18 16:12 UTC (permalink / raw)
  To: linux-kernel; +Cc: Philippe De Muyter, Andrew Morton

some combinations of filesystem and block device (at least vfat on mmc)
yield -EROFS instead of -EACCES when the device is read-only.  Retry
mounting with MS_RDONLY set, just like for the EACCES case, instead of
failing directly.

Signed-off-by: Philippe De Muyter <phdm@macqel.be>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
 init/do_mounts.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/init/do_mounts.c b/init/do_mounts.c
index 82f2288..af7b9b8 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -394,6 +394,7 @@ retry:
 			case 0:
 				goto out;
 			case -EACCES:
+			case -EROFS:
 				flags |= MS_RDONLY;
 				goto retry;
 			case -EINVAL:
-- 
1.7.5.3


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-07-15 10:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-18 16:12 [PATCH] init/do_mounts.c: treat EROFS like EACCES Philippe De Muyter
2014-06-19 21:19 ` Andrew Morton
2014-06-19 23:09   ` Dave Chinner
2014-06-20  8:39     ` [PATCH] VFS: mount must return EACCES, not EROFS Philippe De Muyter
2014-06-27  8:20       ` [PATCH PING] " Philippe De Muyter
2014-07-02 19:46         ` Andrew Morton
2014-07-03 16:29           ` Philippe De Muyter
2014-07-08 21:02             ` Andrew Morton
2014-07-15 10:05               ` Philippe De Muyter
2014-06-20 13:13     ` [PATCH] init/do_mounts.c: treat EROFS like EACCES Philippe De Muyter
2014-06-23  9:22       ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox