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>
fs = cxt->fs;
- /* 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 (cxt->mountflags & MS_PROPAGATION)
- cxt->mountflags &= MS_PROPAGATION;
+ cxt->mountflags &= (MS_PROPAGATION | MS_REC | MS_SILENT);
if (!mnt_optstr_get_option(fs->user_optstr, "user", &val, &valsz)) {
if (val) {
*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. */