From: Lennart Poettering Date: Mon, 26 Apr 2021 19:02:31 +0000 (+0200) Subject: core: make unneeded check a bit tighter X-Git-Tag: v249-rc1~155^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=116654d2cf2817785a48d83453509465c82e3750;p=thirdparty%2Fsystemd.git core: make unneeded check a bit tighter Let's not consider a unit unneeded while it is reloading. Uneeded should be a pretty weak concept: if there's any doubt that something bit be needed, then assume it is. --- diff --git a/src/core/unit.c b/src/core/unit.c index 8f744da2c42..32fbda98842 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -2008,7 +2008,7 @@ bool unit_is_unneeded(Unit *u) { return false; /* Don't clean up while the unit is transitioning or is even inactive. */ - if (!UNIT_IS_ACTIVE_OR_RELOADING(unit_active_state(u))) + if (unit_active_state(u) != UNIT_ACTIVE) return false; if (u->job) return false;