Since the only way to create a controller is from the wrapper API, it is
always linked to one cgroup. Since it would help knowing which cgroup a
controller belongs to, let's just add that information in there.
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
Cc: Glauber Costa <glommer@parallels.com>
struct cgroup_controller {
char name[FILENAME_MAX];
struct control_value *values[CG_NV_MAX];
+ struct cgroup *cgroup;
int index;
};
return NULL;
strncpy(controller->name, name, sizeof(controller->name));
+ controller->cgroup = cgroup;
controller->index = 0;
cgroup->controller[cgroup->index] = controller;