summaryrefslogtreecommitdiffstats
path: root/shlibs/mount/src/context.c
diff options
context:
space:
mode:
Diffstat (limited to 'shlibs/mount/src/context.c')
-rw-r--r--shlibs/mount/src/context.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/shlibs/mount/src/context.c b/shlibs/mount/src/context.c
index 679152052..abe0dc9d0 100644
--- a/shlibs/mount/src/context.c
+++ b/shlibs/mount/src/context.c
@@ -1069,6 +1069,11 @@ int mnt_context_prepare_update(mnt_context *cxt)
assert(cxt->action);
assert((cxt->flags & MNT_FL_MOUNTFLAGS_MERGED));
+ if (cxt->mountflags & MS_PROPAGATION) {
+ DBG(CXT, mnt_debug_h(cxt, "skip update: MS_PROPAGATION"));
+ return 0;
+ }
+
target = mnt_fs_get_target(cxt->fs);
if (cxt->action == MNT_ACT_UMOUNT && target && !strcmp(target, "/"))
@@ -1106,6 +1111,8 @@ int mnt_context_prepare_update(mnt_context *cxt)
int mnt_context_update_tabs(mnt_context *cxt)
{
+ unsigned long fl;
+
assert(cxt);
if (cxt->flags & MNT_FL_NOMTAB) {
@@ -1125,6 +1132,14 @@ int mnt_context_update_tabs(mnt_context *cxt)
return 0;
}
+ fl = mnt_update_get_mountflags(cxt->update);
+ if ((cxt->mountflags & MS_RDONLY) != (fl & MS_RDONLY))
+ /*
+ * fix MS_RDONLY in options
+ */
+ mnt_update_force_rdonly(cxt->update,
+ cxt->mountflags & MS_RDONLY);
+
return mnt_update_tab(cxt->update, mnt_context_get_lock(cxt));
}