]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: systemd-shutdown: add missing check for umount_changed
authorAlan Jenkins <alan.christopher.jenkins@gmail.com>
Thu, 19 Oct 2017 14:00:57 +0000 (15:00 +0100)
committerAlan Jenkins <alan.christopher.jenkins@gmail.com>
Thu, 19 Oct 2017 14:00:57 +0000 (15:00 +0100)
The assumption was that nothing changes in the final attempt.  This
would be confusing if a filesystem with a process in uninterruptible
sleep suddenly became un-stuck for the final attempt, but we still give
up and don't try to e.g. unmount any parent mounts.

I don't know how possible that is.  But the code will be easier to read
without an assumption that it does not attempt to justify.

src/core/umount.c

index 813d2571392965382347b3d534a5f5c08574de95..d8a9c8ca4f2fdd29e8a329b77571f436d8899f92 100644 (file)
@@ -572,6 +572,8 @@ int umount_all(bool *changed) {
 
         /* umount one more time with logging enabled */
         r = mount_points_list_umount(&mp_list_head, &umount_changed, true);
+        if (umount_changed)
+                *changed = true;
 
   end:
         mount_points_list_free(&mp_list_head);