summaryrefslogtreecommitdiffstats
path: root/mount
diff options
context:
space:
mode:
authorKarel Zak2011-01-17 14:00:53 +0100
committerKarel Zak2011-01-17 14:00:53 +0100
commit415192c306058a00680d8ae20d5f45638ea0e5a9 (patch)
treedbc80b821020cb5f369fe29d2ccf9b6ea9935a25 /mount
parentinclude: fix list.h ifdefs (diff)
downloadkernel-qcow2-util-linux-415192c306058a00680d8ae20d5f45638ea0e5a9.tar.gz
kernel-qcow2-util-linux-415192c306058a00680d8ae20d5f45638ea0e5a9.tar.xz
kernel-qcow2-util-linux-415192c306058a00680d8ae20d5f45638ea0e5a9.zip
umount: call is_loop_autoclear() for all loopdevs
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'mount')
-rw-r--r--mount/mount.c2
-rw-r--r--mount/umount.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/mount/mount.c b/mount/mount.c
index ae3c6d25c..d5f9e4c9c 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 7e4eff77a..b93b0b390 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: