From: Karel Zak Date: Tue, 14 May 2013 08:32:56 +0000 (+0200) Subject: libmount: don't ignore root fs on umount -a X-Git-Tag: v2.24-rc1~555 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0b56c459568405213085d8f7ec1f76b7a85d7907;p=thirdparty%2Futil-linux.git libmount: don't ignore root fs on umount -a The release v2.22 (the new umount) introduces a regression when root fs is excluded from umount --all. There is not reason for this exception. The libmount should be smart enough to disable mtab update after rootfs umount. Reported-by: Bruce Dubbs Signed-off-by: Karel Zak --- diff --git a/libmount/src/context_umount.c b/libmount/src/context_umount.c index b9484594bf..4a8659c9c0 100644 --- a/libmount/src/context_umount.c +++ b/libmount/src/context_umount.c @@ -909,11 +909,8 @@ int mnt_context_next_umount(struct libmnt_context *cxt, DBG(CXT, mnt_debug_h(cxt, "next-umount: trying %s", tgt)); - /* ignore root filesystem */ - if ((tgt && (strcmp(tgt, "/") == 0 || strcmp(tgt, "root") == 0)) || - /* ignore filesystems not match with options patterns */ - (cxt->fstype_pattern && !mnt_fs_match_fstype(*fs, + if ((cxt->fstype_pattern && !mnt_fs_match_fstype(*fs, cxt->fstype_pattern)) || /* ignore filesystems not match with type patterns */