[systemd-commits] src/core
Lennart Poettering
lennart at kemper.freedesktop.org
Tue Jul 2 07:24:46 PDT 2013
src/core/cgroup.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
New commits:
commit 06025d9148036ee4de9866f3f067ffa75e14a751
Author: Lennart Poettering <lennart at poettering.net>
Date: Tue Jul 2 16:24:13 2013 +0200
core: don't consider a unit's cgroup empty if only a subcgroup runs empty
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index cdccf3f..c7f1e77 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -728,16 +728,15 @@ int manager_notify_cgroup_empty(Manager *m, const char *cgroup) {
assert(m);
assert(cgroup);
- r = cg_is_empty_recursive(SYSTEMD_CGROUP_CONTROLLER, cgroup, true);
- if (r == 0)
- return 0;
-
u = manager_get_unit_by_cgroup(m, cgroup);
if (u) {
- if (UNIT_VTABLE(u)->notify_cgroup_empty)
- UNIT_VTABLE(u)->notify_cgroup_empty(u);
+ r = cg_is_empty_recursive(SYSTEMD_CGROUP_CONTROLLER, u->cgroup_path, true);
+ if (r > 0) {
+ if (UNIT_VTABLE(u)->notify_cgroup_empty)
+ UNIT_VTABLE(u)->notify_cgroup_empty(u);
- unit_add_to_gc_queue(u);
+ unit_add_to_gc_queue(u);
+ }
}
return 0;
More information about the systemd-commits
mailing list