Skip to contentSkip to conversation

libmount: Allow MNT_FORCE and MNT_DETACH at umount

PATCH Applied Joshua Watt 2 participants 2 messages Nov 6, 2017 – Nov 8, 2017 Util-Linux package

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libmount: Allow MNT_FORCE and MNT_DETACH at umount

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.

---
 libmount/src/context_umount.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
libmount/src/context_umount.c +1 -1
index f6b4ba737..45651b58e 100644
@@ -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",
Signature · 1 line
2.13.6
maintainer Applied
#1 lore raw
Quoted 9 lines · 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.

---
 libmount/src/context_umount.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com