projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8574b79
)
core/cgroup: use UNIT_IS_INACTIVE_OR_FAILED where appropriate
author
Mike Yuan
<me@yhndnzj.com>
Wed, 31 Jul 2024 17:53:53 +0000
(19:53 +0200)
committer
Mike Yuan
<me@yhndnzj.com>
Wed, 31 Jul 2024 19:40:28 +0000
(21:40 +0200)
src/core/cgroup.c
patch
|
blob
|
history
diff --git
a/src/core/cgroup.c
b/src/core/cgroup.c
index 50dd3dd45d9a4adf3341c32dda7df979f676caa5..3f96f64dad2c143bc13ed1d90db26725641b3358 100644
(file)
--- a/
src/core/cgroup.c
+++ b/
src/core/cgroup.c
@@
-3788,7
+3788,7
@@
static int on_cgroup_empty_event(sd_event_source *s, void *userdata) {
unit_add_to_gc_queue(u);
- if (
IN_SET(unit_active_state(u), UNIT_INACTIVE, UNIT_FAILED
))
+ if (
UNIT_IS_INACTIVE_OR_FAILED(unit_active_state(u)
))
unit_prune_cgroup(u);
else if (UNIT_VTABLE(u)->notify_cgroup_empty)
UNIT_VTABLE(u)->notify_cgroup_empty(u);