util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libmount: Allow MNT_FORCE and MNT_DETACH at umount
@ 2017-11-06 22:25 Joshua Watt
  2017-11-08 11:32 ` Karel Zak
  0 siblings, 1 reply; 2+ messages in thread
From: Joshua Watt @ 2017-11-06 22:25 UTC (permalink / raw)
  To: util-linux; +Cc: Joshua Watt

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libmount/src/context_umount.c b/libmount/src/context_umount.c
index f6b4ba737..45651b58e 100644
--- a/libmount/src/context_umount.c
+++ b/libmount/src/context_umount.c
@@ -704,7 +704,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",
-- 
2.13.6


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-11-08 11:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-06 22:25 [PATCH] libmount: Allow MNT_FORCE and MNT_DETACH at umount Joshua Watt
2017-11-08 11:32 ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).