]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: don't ignore root fs on umount -a
authorKarel Zak <kzak@redhat.com>
Tue, 14 May 2013 08:32:56 +0000 (10:32 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 14 May 2013 08:32:56 +0000 (10:32 +0200)
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 <bruce.dubbs@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/context_umount.c

index b9484594bf8bada2b873d782f989e59f2f6b3cff..4a8659c9c06c7bb28b7d4bc2c21bd9f768d00501 100644 (file)
@@ -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 */