lkml.org 
[lkml]   [2014]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] init/do_mounts.c: treat EROFS like EACCES
On Wed, 18 Jun 2014 18:12:44 +0200 Philippe De Muyter <phdm@macqel.be> wrote:

> 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.
>
> ...
>
> --- 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:

hm, what's going on here. I'd have thought it to be very logical that
file_system_type.mount() would return EROFS if the device is read-only!
But I'm suspecting that there is some convention that the fs is
supposed to return EACCES in this case. So *perhaps* it is vfat-on-mmc
which needs fixing. Dunno.

Al, are you able to shed light?



\
 
 \ /
  Last update: 2014-06-19 23:41    [W:0.091 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site