cgroups: coding style fixes

Cc: stable-4.0 Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 9cde8a8a
...@@ -153,14 +153,15 @@ static struct hierarchy *get_hierarchy(struct cgroup_ops *ops, const char *contr ...@@ -153,14 +153,15 @@ static struct hierarchy *get_hierarchy(struct cgroup_ops *ops, const char *contr
for (int i = 0; ops->hierarchies[i]; i++) { for (int i = 0; ops->hierarchies[i]; i++) {
if (!controller) { if (!controller) {
/* This is the empty unified hierarchy. */ /* This is the empty unified hierarchy. */
if (ops->hierarchies[i]->controllers && if (ops->hierarchies[i]->controllers && !ops->hierarchies[i]->controllers[0])
!ops->hierarchies[i]->controllers[0])
return ops->hierarchies[i]; return ops->hierarchies[i];
continue; continue;
} else if (pure_unified_layout(ops) && } else if (pure_unified_layout(ops) &&
strcmp(controller, "devices") == 0) { strcmp(controller, "devices") == 0) {
if (ops->unified->bpf_device_controller) if (ops->unified->bpf_device_controller)
return ops->unified; return ops->unified;
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment