mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-13 12:58:20 +03:00
process-util: move sync() out of freeze()
We are using this for creating userns namespaces, and we really shouldn't try to sync there. Moreover the use of free() in shutdown code doesn't need it anyway, since it just sync()ed right before anyway. Only the third user of freeze() we have actually needs the syc(), hence do it there and nowhere else.
This commit is contained in:
parent
979b0ff2c4
commit
43cac49092
@ -1624,8 +1624,6 @@ _noreturn_ void freeze(void) {
|
||||
/* Make sure nobody waits for us on a socket anymore */
|
||||
(void) close_all_fds_full(NULL, 0, false);
|
||||
|
||||
sync();
|
||||
|
||||
/* Let's not freeze right away, but keep reaping zombies. */
|
||||
for (;;) {
|
||||
siginfo_t si = {};
|
||||
|
@ -222,6 +222,7 @@ _noreturn_ static void freeze_or_exit_or_reboot(void) {
|
||||
}
|
||||
|
||||
log_emergency("Freezing execution.");
|
||||
sync();
|
||||
freeze();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user