From 116654d2cf2817785a48d83453509465c82e3750 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 26 Apr 2021 21:02:31 +0200 Subject: [PATCH] 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. --- src/core/unit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.47.3