diff options
author | Tejun Heo <tj@kernel.org> | 2014-05-16 19:22:48 +0200 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2014-05-16 19:22:48 +0200 |
commit | d5c419b68e368fdd9f1857bf8d4bb4480edb9b80 (patch) | |
tree | 6d33da7872654ff796b103f3e1d49ec28025a157 /include | |
parent | cgroup: remove cgroup->parent (diff) | |
download | linux-d5c419b68e368fdd9f1857bf8d4bb4480edb9b80.tar.xz linux-d5c419b68e368fdd9f1857bf8d4bb4480edb9b80.zip |
cgroup: move cgroup->sibling and ->children into cgroup_subsys_state
We're moving towards using cgroup_subsys_states as the fundamental
structural blocks. Let's move cgroup->sibling and ->children into
cgroup_subsys_state. This is pure move without functional change and
only cgroup->self's fields are actually used. Other csses will make
use of the fields later.
While at it, update init_and_link_css() so that it zeroes the whole
css before initializing it and remove explicit zeroing of ->flags.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizefan@huawei.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/cgroup.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index fd538f4c2bb6..cf8ba26b7c6e 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h @@ -68,6 +68,10 @@ struct cgroup_subsys_state { /* PI: the parent css */ struct cgroup_subsys_state *parent; + /* siblings list anchored at the parent's ->children */ + struct list_head sibling; + struct list_head children; + /* * PI: Subsys-unique ID. 0 is unused and root is always 1. The * matching css can be looked up using css_from_id(). @@ -171,13 +175,6 @@ struct cgroup { */ int populated_cnt; - /* - * We link our 'sibling' struct into our parent's 'children'. - * Our children link their 'sibling' into our 'children'. - */ - struct list_head sibling; /* my parent's children */ - struct list_head children; /* my children */ - struct kernfs_node *kn; /* cgroup kernfs entry */ struct kernfs_node *populated_kn; /* kn for "cgroup.subtree_populated" */ |