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.
This commit is contained in:
Lennart Poettering 2013-07-11 18:42:12 +02:00
parent be2c1bd2a8
commit 8a84192905
1 changed files with 1 additions and 1 deletions

View File

@ -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));