cgroup: make sure cg_is_empty_recursive() returns 1 for non-existing cgroups
Previously, on the legacy hierarchy a non-existing cgroup was considered identical to an empty one, but the unified hierarchy the check for a non-existing one returned ENOENT.
This commit is contained in:
@@ -1002,6 +1002,8 @@ int cg_is_empty_recursive(const char *controller, const char *path) {
|
||||
return r;
|
||||
|
||||
r = read_one_line_file(populated, &t);
|
||||
if (r == -ENOENT)
|
||||
return 1;
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user