move MANAGER_IS_RELOADING() check into manager_recheck_{dbus|journal}() (#8510)

Let's better check this inside of the call than before it, so that we
never issue this while reloading, even should these calls be called due
to other reasons than just the unit notify.

This makes sure the reload state is unset a bit earlier in
manager_reload() so that we can safely call this function from there and
they do the right thing.

Follow-up for e63ebf71ed.
This commit is contained in:
Lennart Poettering
2018-03-21 12:03:45 +01:00
committed by Zbigniew Jędrzejewski-Szmek
parent d56fced9e0
commit 31dc1ca3bf
2 changed files with 12 additions and 7 deletions
+2 -4
View File
@@ -2501,10 +2501,8 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
}
}
if (!MANAGER_IS_RELOADING(u->manager)) {
manager_recheck_journal(m);
manager_recheck_dbus(m);
}
manager_recheck_journal(m);
manager_recheck_dbus(m);
unit_trigger_notify(u);