summaryrefslogtreecommitdiff
path: root/src/unit.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-07-10 17:34:42 +0200
committerLennart Poettering <lennart@poettering.net>2010-07-10 17:34:42 +0200
commitfb385181517aa97fc5b379380cde0c2567f5f444 (patch)
tree91c7ee6fd3313830806c987f0d89fa383717e3aa /src/unit.c
parent582a507f1abdca75abe34945b4bbd5e97e9b45a8 (diff)
unit: trim cgroups when going down
Diffstat (limited to 'src/unit.c')
-rw-r--r--src/unit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/unit.c b/src/unit.c
index c287310a48..18faae22e4 100644
--- a/src/unit.c
+++ b/src/unit.c
@@ -973,6 +973,9 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns) {
if (ns != os && ns == UNIT_MAINTENANCE)
log_notice("Unit %s entered maintenance state.", u->meta.id);
+ if (UNIT_IS_INACTIVE_OR_MAINTENANCE(ns))
+ cgroup_bonding_trim_list(u->meta.cgroup_bondings, true);
+
timer_unit_notify(u, ns);
path_unit_notify(u, ns);