summaryrefslogtreecommitdiffstats
path: root/mount
diff options
context:
space:
mode:
authorDong Hao2012-03-21 06:50:14 +0100
committerKarel Zak2012-03-21 12:35:54 +0100
commitc7b0af96bcd7489424ff291bbbc9d14b2dda9435 (patch)
treecf593dca516a5a09cbb0a560cdbc8a5dd0c37654 /mount
parentfsck: tiny coding style fix (diff)
downloadkernel-qcow2-util-linux-c7b0af96bcd7489424ff291bbbc9d14b2dda9435.tar.gz
kernel-qcow2-util-linux-c7b0af96bcd7489424ff291bbbc9d14b2dda9435.tar.xz
kernel-qcow2-util-linux-c7b0af96bcd7489424ff291bbbc9d14b2dda9435.zip
mount: fix recursively propagation mounting
Provide the recursive flag of propagation mounting. Recursive flag could be used together with propagation flag. [kzak@redhat.com: - add MS_SILENT to acceptable propagation flags, - fix new code in libmount too] Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: Dong Hao <haodong@linux.vnet.ibm.com>
Diffstat (limited to 'mount')
-rw-r--r--mount/mount.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mount/mount.c b/mount/mount.c
index 2ce48293e..396f357d9 100644
--- a/mount/mount.c
+++ b/mount/mount.c
@@ -601,9 +601,10 @@ parse_opts (const char *options, int *flags, char **extra_opts) {
*flags |= mounttype;
- /* The propagation flags should not be used together with any other flags */
+ /* The propagation flags should not be used together with any
+ * other flags (except MS_REC and MS_SILENT) */
if (*flags & MS_PROPAGATION)
- *flags &= MS_PROPAGATION;
+ *flags &= (MS_PROPAGATION | MS_REC | MS_SILENT);
}
/* Try to build a canonical options string. */