summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-07-11 18:42:12 +0200
committerLennart Poettering <lennart@poettering.net>2013-07-11 18:49:52 +0200
commit8a84192905a9845fda31b65cc433127f9c2f95ae (patch)
tree8434599b56095ec6d76abe1fdb2a41615db10deb /src/core
parentbe2c1bd2a843aa61901086fccbae15b3aa085fb1 (diff)
cgroup: don't ever try to destroy the cgroup of the root slice
The root slice is after all the root cgroup, so don't attempt to delete it.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/cgroup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index b9ef00c617..d0f36cb18e 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -531,7 +531,7 @@ void unit_destroy_cgroup(Unit *u) {
if (!u->cgroup_path)
return;
- r = cg_trim_with_mask(u->cgroup_mask, u->cgroup_path, true);
+ r = cg_trim_with_mask(u->cgroup_mask, u->cgroup_path, !unit_has_name(u, SPECIAL_ROOT_SLICE));
if (r < 0)
log_debug("Failed to destroy cgroup %s: %s", u->cgroup_path, strerror(-r));