summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-04-26 21:02:31 +0200
committerLennart Poettering <lennart@poettering.net>2021-05-25 16:03:03 +0200
commit116654d2cf2817785a48d83453509465c82e3750 (patch)
tree1947b630d7d9969a2e4acbb5900afb10da5794d4 /src
parent7e9212bf1a0fdcebc08876033f95f64973a048b3 (diff)
downloadsystemd-116654d2cf2817785a48d83453509465c82e3750.tar.gz
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.
Diffstat (limited to 'src')
-rw-r--r--src/core/unit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index 8f744da2c4..32fbda9884 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;