From: Alan Jenkins Date: Thu, 19 Oct 2017 14:00:57 +0000 (+0100) Subject: core: systemd-shutdown: add missing check for umount_changed X-Git-Tag: v236~292^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=066b753dc5fefd0bfef92e28d3492667e2ffe22b;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/core/umount.c b/src/core/umount.c index 813d2571392..d8a9c8ca4f2 100644 --- a/src/core/umount.c +++ b/src/core/umount.c @@ -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);