chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
unit: fix the race in deserialization.
[elogind.git]
/
src
/
core
/
unit.c
diff --git
a/src/core/unit.c
b/src/core/unit.c
index e2c06ae8b638123fe2df8d90908fb3f408ea2f75..601be60ed0595311910218a2b916f0ae2112bbf5 100644
(file)
--- a/
src/core/unit.c
+++ b/
src/core/unit.c
@@
-1517,7
+1517,8
@@
void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
/* Maybe we finished startup and are now ready for being
* stopped because unneeded? */
/* Maybe we finished startup and are now ready for being
* stopped because unneeded? */
- unit_check_unneeded(u);
+ if (u->manager->n_reloading <= 0)
+ unit_check_unneeded(u);
unit_add_to_dbus_queue(u);
unit_add_to_gc_queue(u);
unit_add_to_dbus_queue(u);
unit_add_to_gc_queue(u);