diff options
author | Karel Zak | 2015-06-03 10:59:35 +0200 |
---|---|---|
committer | Karel Zak | 2015-06-03 11:02:25 +0200 |
commit | 28cdf9c61206034b733bf5dcbdea179b8238271f (patch) | |
tree | c11eb1049337e1dcc3084e226e2a2f691a1b11bd /libmount/src/context.c | |
parent | lscpu: add warning for __SANITIZE_ADDRESS__ (diff) | |
download | kernel-qcow2-util-linux-28cdf9c61206034b733bf5dcbdea179b8238271f.tar.gz kernel-qcow2-util-linux-28cdf9c61206034b733bf5dcbdea179b8238271f.tar.xz kernel-qcow2-util-linux-28cdf9c61206034b733bf5dcbdea179b8238271f.zip |
libmount: do not call umount helper on --fake
The umount.<type> helpers does not support --fake option and it does
not make sense to call the helpers at all. All we need is to remove
mtab/utab entries.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1172297
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/context.c')
-rw-r--r-- | libmount/src/context.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libmount/src/context.c b/libmount/src/context.c index 8d19dc289..ec04191fc 100644 --- a/libmount/src/context.c +++ b/libmount/src/context.c @@ -1816,10 +1816,10 @@ int mnt_context_prepare_update(struct libmnt_context *cxt) target = mnt_fs_get_target(cxt->fs); - if (cxt->action == MNT_ACT_UMOUNT && target && !strcmp(target, "/")) - /* Don't try to touch mtab if umounting root FS */ + if (cxt->action == MNT_ACT_UMOUNT && target && !strcmp(target, "/")) { + DBG(CXT, ul_debugobj(cxt, "root umount: setting NOMTAB")); mnt_context_disable_mtab(cxt, TRUE); - + } if (mnt_context_is_nomtab(cxt)) { DBG(CXT, ul_debugobj(cxt, "skip update: NOMTAB flag")); return 0; |