mirror of
https://github.com/systemd/systemd.git
synced 2026-07-14 19:40:32 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user