core: systemd-shutdown: add missing check for umount_changed

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.
This commit is contained in:
Alan Jenkins
2017-10-19 15:00:57 +01:00
parent 19a44dfe45
commit 066b753dc5

View 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);