diff options
author | Tejun Heo <tj@kernel.org> | 2013-08-08 20:11:22 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-08-08 20:11:22 -0400 |
commit | 72c97e54e0f043d33b246d7460ae0a36c4b8c643 (patch) | |
tree | 6ab5c1866671d43451aa2a03a0d3e68fada2f291 /kernel | |
parent | 3f79851831a135c5cebbcaa8cddb07d02870b069 (diff) |
cgroup: add subsystem pointer to cgroup_subsys_state
Currently, given a cgroup_subsys_state, there's no way to find out
which subsystem the css is for, which we'll need to convert the cgroup
controller API to primarily use @css instead of @cgroup. This patch
adds cgroup_subsys_state->ss which points to the subsystem the @css
belongs to.
While at it, remove the comment about accessing @css->cgroup to
determine the hierarchy. cgroup core will provide API to traverse
hierarchy of css'es and we don't want subsystems to directly walk
cgroup hierarchies anymore.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizefan@huawei.com>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/cgroup.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 0b3caa3220cb..4234428f1014 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -4186,6 +4186,7 @@ static void init_cgroup_css(struct cgroup_subsys_state *css, | |||
4186 | struct cgroup *cgrp) | 4186 | struct cgroup *cgrp) |
4187 | { | 4187 | { |
4188 | css->cgroup = cgrp; | 4188 | css->cgroup = cgrp; |
4189 | css->ss = ss; | ||
4189 | css->flags = 0; | 4190 | css->flags = 0; |
4190 | css->id = NULL; | 4191 | css->id = NULL; |
4191 | if (cgrp == cgroup_dummy_top) | 4192 | if (cgrp == cgroup_dummy_top) |