From: Lennart Poettering Date: Thu, 9 Jan 2020 13:55:15 +0000 (+0100) Subject: mount-util: don't mask away MS_RDONLY twice X-Git-Tag: v245-rc1~144^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4eaf0d9401ab26609b737fe25aa19dcc1e1aa314;p=thirdparty%2Fsystemd.git mount-util: don't mask away MS_RDONLY twice We have the flags mask for that, and if callers really wanted us to mask this away, then they should pass the correct mask. --- diff --git a/src/shared/mount-util.c b/src/shared/mount-util.c index cf500a126be..935691ce778 100644 --- a/src/shared/mount-util.c +++ b/src/shared/mount-util.c @@ -237,7 +237,6 @@ int bind_remount_recursive_with_mountinfo( orig_flags = 0; (void) get_mount_flags(simplified, &orig_flags, table); - orig_flags &= ~MS_RDONLY; if (mount(NULL, simplified, NULL, (orig_flags & ~flags_mask)|MS_BIND|MS_REMOUNT|new_flags, NULL) < 0) return -errno; @@ -279,7 +278,6 @@ int bind_remount_recursive_with_mountinfo( /* Try to reuse the original flag set */ orig_flags = 0; (void) get_mount_flags(x, &orig_flags, table); - orig_flags &= ~MS_RDONLY; if (mount(NULL, x, NULL, (orig_flags & ~flags_mask)|MS_BIND|MS_REMOUNT|new_flags, NULL) < 0) return -errno;