]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: try read-only mount on write-protected superblock too
authorKarel Zak <kzak@redhat.com>
Tue, 3 Mar 2020 10:39:10 +0000 (11:39 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 3 Mar 2020 10:39:10 +0000 (11:39 +0100)
commit11b916cdabd9f57a4cddf10fd743af2165930dcd
tree57160e26b2ee9f4e30ad0ef79f8f1b53bd8161ab
parentacd229fc2afe0c402cca3b21e0490be71dec2725
libmount: try read-only mount on write-protected superblock too

The classic mount(8) behavior is to try read-only on write-protected devices
if the first mount syscall attempt ends with EACCES.

It seems we can implement this feature also for EBUSY if the same mount source
is already mounted with "ro" superblock option.

The typical use-case is iso image (always read-only) mounted on two places.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1809124
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/context_mount.c
sys-utils/mount.8