diff options
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/cgroup-util.c | 4 |
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; |