diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-06-30 23:56:11 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-07-01 00:17:59 +0200 |
commit | b56c28c31adc101df82c1c3c30740b47cbd4f782 (patch) | |
tree | d6c88f479373975f1aa13a9e203ad0e6c02794be /src | |
parent | 0a1eb06d9aacc1f007be04c4133031e0acc91cdd (diff) |
cgroup: implicitly add units to GC queue when their cgroups run empty
Diffstat (limited to 'src')
-rw-r--r-- | src/core/cgroup.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/cgroup.c b/src/core/cgroup.c index 1c818ab300..cdccf3ff15 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -733,8 +733,12 @@ int manager_notify_cgroup_empty(Manager *m, const char *cgroup) { return 0; u = manager_get_unit_by_cgroup(m, cgroup); - if (u && UNIT_VTABLE(u)->notify_cgroup_empty) - UNIT_VTABLE(u)->notify_cgroup_empty(u); + if (u) { + if (UNIT_VTABLE(u)->notify_cgroup_empty) + UNIT_VTABLE(u)->notify_cgroup_empty(u); + + unit_add_to_gc_queue(u); + } return 0; } |