summaryrefslogtreecommitdiff
path: root/src/basic
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-09-01 18:36:28 +0200
committerLennart Poettering <lennart@poettering.net>2015-09-01 18:37:01 +0200
commit6fd66507378bd8706cba38f82167a54d9d116e43 (patch)
treea234c3f745c5e85349334f4307bb6db73298c2e8 /src/basic
parent6f883237f1b8a96ec0ea354866e033b6fcea9506 (diff)
cgroup: the root cgroup is always populated
Diffstat (limited to 'src/basic')
-rw-r--r--src/basic/cgroup-util.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
index 61681ada8d..98adace55a 100644
--- a/src/basic/cgroup-util.c
+++ b/src/basic/cgroup-util.c
@@ -918,6 +918,10 @@ int cg_is_empty_recursive(const char *controller, const char *path) {
assert(path);
+ /* The root cgroup is always populated */
+ if (controller && (isempty(path) || path_equal(path, "/")))
+ return 0;
+
r = cg_is_empty(controller, path);
if (r <= 0)
return r;