return true;
}
-static bool cgm_supports_multiple_controllers;
-/*
- * if cgm_all_controllers_same is true, then cgm_supports_multiple_controllers
- * is true
- */
static bool cgm_all_controllers_same;
/*
size_t sz = 0;
char path[100];
- cgm_supports_multiple_controllers = false;
cgm_all_controllers_same = false;
- cgm_supports_multiple_controllers = true;
-
if (pid == -1)
sprintf(path, "/proc/self/cgroup");
else
}
destuid = get_ns_uid(arg->origuid);
- if (cgm_supports_multiple_controllers)
+ if (cgm_all_controllers_same)
slist = subsystems_inone;
for (i = 0; slist[i]; i++) {
* This can't be done in the child namespace because it only group-owns
* the cgroup
*/
- if (cgm_supports_multiple_controllers)
+ if (cgm_all_controllers_same)
slist = subsystems_inone;
for (i = 0; slist[i]; i++) {
return;
}
- if (cgm_supports_multiple_controllers)
+ if (cgm_all_controllers_same)
slist = subsystems_inone;
for (i = 0; slist[i]; i++)
cgm_remove_cgroup(slist[i], d->cgroup_path);
int i;
char **slist = subsystems;
- if (cgm_supports_multiple_controllers)
+ if (cgm_all_controllers_same)
slist = subsystems_inone;
for (i = 0; slist[i]; i++)
cgm_remove_cgroup(slist[i], path);
}
existed = 0;
- if (cgm_supports_multiple_controllers)
+ if (cgm_all_controllers_same)
slist = subsystems_inone;
for (i = 0; slist[i]; i++) {
return NULL;
if (api_version < CGM_SUPPORTS_MULT_CONTROLLERS)
- cgm_supports_multiple_controllers = false;
+ cgm_all_controllers_same = false;
// if root, try to escape to root cgroup
if (geteuid() == 0 && !cgm_escape()) {