summaryrefslogtreecommitdiff
path: root/include/linux/cgroup.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2014-05-16 21:22:48 +0400
committerTejun Heo <tj@kernel.org>2014-05-16 21:22:48 +0400
commitd5c419b68e368fdd9f1857bf8d4bb4480edb9b80 (patch)
tree6d33da7872654ff796b103f3e1d49ec28025a157 /include/linux/cgroup.h
parentd51f39b05ce0008118c45945e681b20484990571 (diff)
downloadlinux-d5c419b68e368fdd9f1857bf8d4bb4480edb9b80.tar.xz
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/linux/cgroup.h')
-rw-r--r--include/linux/cgroup.h11
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" */