diff options
author | Tejun Heo <tj@kernel.org> | 2014-04-23 11:13:14 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2014-04-23 11:13:14 -0400 |
commit | f392e51cd6ae6f6ee5b9b6d611cdc282b4c1711e (patch) | |
tree | add95b5d189432489943674c0ab1ddc088cd63c1 /include/linux/cgroup.h | |
parent | ea8fd3b47ff4ed4b1b5942bf3e0cb8d8f590ec59 (diff) |
cgroup: update cgroup->subsys_mask to ->child_subsys_mask and restore cgroup_root->subsys_mask
944196278d3d ("cgroup: move ->subsys_mask from cgroupfs_root to
cgroup") moved ->subsys_mask from cgroup_root to cgroup to prepare for
the unified hierarhcy; however, it turns out that carrying the
subsys_mask of the children in the parent, instead of itself, is a lot
more natural. This patch restores cgroup_root->subsys_mask and morphs
cgroup->subsys_mask into cgroup->child_subsys_mask.
* Uses of root->cgrp.subsys_mask are restored to root->subsys_mask.
* Remove automatic setting and clearing of cgrp->subsys_mask and
instead just inherit ->child_subsys_mask from the parent during
cgroup creation. Note that this doesn't affect any current
behaviors.
* Undo __kill_css() separation.
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.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index c2515851c1aa..1b5b2fe1b228 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -173,8 +173,8 @@ struct cgroup { | |||
173 | */ | 173 | */ |
174 | u64 serial_nr; | 174 | u64 serial_nr; |
175 | 175 | ||
176 | /* The bitmask of subsystems attached to this cgroup */ | 176 | /* the bitmask of subsystems enabled on the child cgroups */ |
177 | unsigned long subsys_mask; | 177 | unsigned long child_subsys_mask; |
178 | 178 | ||
179 | /* Private pointers for each registered subsystem */ | 179 | /* Private pointers for each registered subsystem */ |
180 | struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT]; | 180 | struct cgroup_subsys_state __rcu *subsys[CGROUP_SUBSYS_COUNT]; |
@@ -282,6 +282,9 @@ enum { | |||
282 | struct cgroup_root { | 282 | struct cgroup_root { |
283 | struct kernfs_root *kf_root; | 283 | struct kernfs_root *kf_root; |
284 | 284 | ||
285 | /* The bitmask of subsystems attached to this hierarchy */ | ||
286 | unsigned long subsys_mask; | ||
287 | |||
285 | /* Unique id for this hierarchy. */ | 288 | /* Unique id for this hierarchy. */ |
286 | int hierarchy_id; | 289 | int hierarchy_id; |
287 | 290 | ||