From: Lennart Poettering Date: Thu, 11 Jul 2013 16:42:12 +0000 (+0200) Subject: cgroup: don't ever try to destroy the cgroup of the root slice X-Git-Tag: v206~138 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=8a84192905a9845fda31b65cc433127f9c2f95ae 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. --- diff --git a/src/core/cgroup.c b/src/core/cgroup.c index b9ef00c61..d0f36cb18 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));