]> err.no Git - util-linux/commit
mount: when a remount to rw fails, quit and return an error
authorValerie Aurora <vaurora@redhat.com>
Tue, 14 Jul 2009 17:21:34 +0000 (13:21 -0400)
committerKarel Zak <kzak@redhat.com>
Tue, 14 Jul 2009 18:32:54 +0000 (20:32 +0200)
commit3bb3fe8cb0233a07919125f5e839cae80fe28a38
treef71da2a8e95f16b723ae93f1bcba40187971933d
parenta692a8745941a192528c5e2a05de97155ba586f9
mount: when a remount to rw fails, quit and return an error

A nice feature of mount is that when you attempt to mount a file
system read-write, and that fails because it can only be mounted
read-only, it goes ahead and retries the mount with the "ro" option
and returns success if that succeeds.  However, this code path is also
followed when you are doing a remount for the sole purpose of changing
the mount from read-only to read-write - the change fails, but mount
returns success.  Instead, check if we are attempting to remount and
fail out immediately, instead of retrying with the old "ro" option and
whee, happily "succeeding."

Signed-off-by: Valerie Aurora (Henson) <vaurora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
mount/mount.c