diff --git a/src/extra-tools/66-umountall.c b/src/extra-tools/66-umountall.c
index dc906c959730436605703119ab9cb6fc93c2d869..3ab7c92e07956c93ec7464a51179b01070034d28 100644
--- a/src/extra-tools/66-umountall.c
+++ b/src/extra-tools/66-umountall.c
@@ -61,6 +61,7 @@ int main (int argc, char const *const *argv)
 		errno = 0 ;
 		p = getmntent(fp) ;
 		if (!p) break ;
+		if (!strcmp(p->mnt_dir,tmpdir)) continue ;
 		for (; i < EXCLUDEN ; i++)
 		{
 			if (!strcmp(p->mnt_type, exclude_type[i]))
@@ -69,8 +70,7 @@ int main (int argc, char const *const *argv)
 				break ;
 			}
 		}
-		if ((i < EXCLUDEN && got[i] == 1) || !strcmp(p->mnt_dir,tmpdir))
-			continue ;
+		if (i < EXCLUDEN && got[i] == 1) continue ;
 		if (line >= MAXLINES)
 			log_die(100, "too many mount points") ;
 		mountpoints[line++] = sa.len ;