diff options
author | Karel Zak | 2010-12-17 17:46:24 +0100 |
---|---|---|
committer | Karel Zak | 2011-01-03 12:28:47 +0100 |
commit | 36bda5cbd0a18b2ae6aadd36fd54813f29566602 (patch) | |
tree | 5270b2ee85dcc3eeb618b98a16102ae7e2d2a5fd /shlibs/mount/src/context.c | |
parent | tests: add libmount utab tests (diff) | |
download | kernel-qcow2-util-linux-36bda5cbd0a18b2ae6aadd36fd54813f29566602.tar.gz kernel-qcow2-util-linux-36bda5cbd0a18b2ae6aadd36fd54813f29566602.tar.xz kernel-qcow2-util-linux-36bda5cbd0a18b2ae6aadd36fd54813f29566602.zip |
libmount: cleanup MS_RDONLY usageand mnt_update_* symbols
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'shlibs/mount/src/context.c')
-rw-r--r-- | shlibs/mount/src/context.c | 15 |
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)); } |