From 415192c306058a00680d8ae20d5f45638ea0e5a9 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 17 Jan 2011 14:00:53 +0100 Subject: [PATCH] umount: call is_loop_autoclear() for all loopdevs Signed-off-by: Karel Zak --- mount/mount.c | 2 +- mount/umount.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mount/mount.c b/mount/mount.c index ae3c6d25..d5f9e4c9 100644 --- a/mount/mount.c +++ b/mount/mount.c @@ -1233,7 +1233,7 @@ loop_check(const char **spec, const char **type, int *flags, if (verbose) printf(_("mount: skipping the setup of a loop device\n")); } else { - int loop_opts; + int loop_opts = 0; int res; /* since 2.6.37 we don't have to store backing filename to mtab diff --git a/mount/umount.c b/mount/umount.c index 7e4eff77..b93b0b39 100644 --- a/mount/umount.c +++ b/mount/umount.c @@ -234,7 +234,7 @@ umount_one (const char *spec, const char *node, const char *type, * Ignore the option "-d" for non-loop devices and loop devices with * LO_FLAGS_AUTOCLEAR flag. */ - if (delloop && is_loop_device(spec) && !is_loop_autoclear(spec)) + if (delloop && is_loop_device(spec)) myloop = 1; if (lazy) { @@ -329,7 +329,7 @@ umount_one (const char *spec, const char *node, const char *type, loopdev = spec; } gotloop: - if (loopdev) + if (loopdev && !is_loop_autoclear(loopdev)) del_loop(loopdev); writemtab: -- 2.39.5