diff options
author | Karel Zak | 2018-06-01 12:16:19 +0200 |
---|---|---|
committer | Karel Zak | 2018-06-01 12:16:19 +0200 |
commit | 816773b475900909d42c2c8282a6ac50252cac22 (patch) | |
tree | 94a7673aae55f11bc0c28aa16dd393b2e4e1162a /libmount/src/context_umount.c | |
parent | mount: use internally string to set move/bind operations (diff) | |
download | kernel-qcow2-util-linux-816773b475900909d42c2c8282a6ac50252cac22.tar.gz kernel-qcow2-util-linux-816773b475900909d42c2c8282a6ac50252cac22.tar.xz kernel-qcow2-util-linux-816773b475900909d42c2c8282a6ac50252cac22.zip |
libmount: improve MS_REC usage
libmount allows to split one library (mount(8)) call to multiple mount(2)
syscalls, for example
--rbind --make-rslave
in this case we have to be careful with MS_REC because the flag is
applied to multiple operations.
# strace -e mount mount --rbind --make-rslave /mnt/A /mnt/B
Old version:
mount("/mnt/A", "/mnt/B", 0x13ecac0, MS_MGC_VAL|MS_BIND, NULL) = 0
mount("none", "/mnt/B", NULL, MS_REC|MS_SLAVE, NULL) = 0
Fixed version:
mount("/mnt/A", "/mnt/B", 0x1f22ac0, MS_MGC_VAL|MS_BIND|MS_REC, NULL) = 0
mount("none", "/mnt/B", NULL, MS_REC|MS_SLAVE, NULL) = 0
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1584443
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/context_umount.c')
0 files changed, 0 insertions, 0 deletions