mount: Use MS_BIND when remounting R/O
authorRobert Swiecki <robert@swiecki.net>
Thu, 6 Jul 2017 17:39:12 +0000 (19:39 +0200)
committerRobert Swiecki <robert@swiecki.net>
Thu, 6 Jul 2017 17:39:12 +0000 (19:39 +0200)
mount.c

diff --git a/mount.c b/mount.c
index 612bab327cd405ac824c20615a07550b7644c8af..0771738877d12d9aa6b587b2b3c35ac108143cac 100644 (file)
--- a/mount.c
+++ b/mount.c
@@ -229,7 +229,7 @@ static bool mountRemountRO(struct mounts_t *mpt)
         * the flag in `f_flag'.  These definitions should be
         * kept in sync with the definitions in <sys/mount.h>'
         */
-       unsigned long new_flags = MS_REMOUNT | MS_RDONLY | vfs.f_flag;
+       unsigned long new_flags = MS_REMOUNT | MS_BIND | MS_RDONLY | vfs.f_flag;
 
        LOG_D("Re-mounting R/O '%s' (old_flags:%s, new_flags:%s)", mpt->dst,
              mountFlagsToStr(vfs.f_flag), mountFlagsToStr(new_flags));