From 066b753dc5fefd0bfef92e28d3492667e2ffe22b Mon Sep 17 00:00:00 2001 From: Alan Jenkins Date: Thu, 19 Oct 2017 15:00:57 +0100 Subject: [PATCH] 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. --- src/core/umount.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/umount.c b/src/core/umount.c index 813d257..d8a9c8c 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); -- 2.7.4