chiark / gitweb /
umount: fix check for DM changed
authorMichal Schmidt <mschmidt@redhat.com>
Fri, 7 Dec 2012 16:34:21 +0000 (17:34 +0100)
committerMichal Schmidt <mschmidt@redhat.com>
Fri, 7 Dec 2012 16:34:21 +0000 (17:34 +0100)
delete_dm() returns 0 on success. The check for "r > 0" was likely
a copy&paste error from the loopback code where "r > 0" makes sense.

src/core/umount.c

index f6c520e..8776807 100644 (file)
@@ -536,7 +536,7 @@ static int dm_points_list_detach(MountPoint **head, bool *changed) {
 
                 if ((r = delete_dm(m->devnum)) >= 0) {
 
-                        if (r > 0 && changed)
+                        if (changed)
                                 *changed = true;
 
                         mount_point_free(head, m);