]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: Allow MNT_FORCE and MNT_DETACH at umount
authorJoshua Watt <jpewhacker@gmail.com>
Mon, 6 Nov 2017 22:25:36 +0000 (16:25 -0600)
committerKarel Zak <kzak@redhat.com>
Thu, 14 Dec 2017 14:29:38 +0000 (15:29 +0100)
MNT_FORCE and MNT_DETACH are orthogonal in the Linux kernel, so both may
be specified without any problems. Even if there were a problem with
this combination, it should be up to the kernel to take the correct
action or report an error.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
libmount/src/context_umount.c

index a8124629f38cb07aa76d042eab638ccb1cd207c2..512b991ec3257778d80bdfe1ed94d7cc018b0dff 100644 (file)
@@ -696,7 +696,7 @@ static int do_umount(struct libmnt_context *cxt)
        if (mnt_context_is_lazy(cxt))
                flags |= MNT_DETACH;
 
-       else if (mnt_context_is_force(cxt))
+       if (mnt_context_is_force(cxt))
                flags |= MNT_FORCE;
 
        DBG(CXT, ul_debugobj(cxt, "umount(2) [target='%s', flags=0x%08x]%s",