]> git.baikalelectronics.ru Git - kernel.git/commit
cgroup: factor out cgroup_apply_control_enable() from cgroup_subtree_control_write()
authorTejun Heo <tj@kernel.org>
Thu, 3 Mar 2016 14:57:59 +0000 (09:57 -0500)
committerTejun Heo <tj@kernel.org>
Thu, 3 Mar 2016 14:57:59 +0000 (09:57 -0500)
commit3a44a62a7e2030cdc78cf293723488ad3b6f20c1
tree28d344a6ebeecc252596933257412a92f3ab1626
parent97cb89afd86c268ce38b047ce20a14efb9318f80
cgroup: factor out cgroup_apply_control_enable() from cgroup_subtree_control_write()

Factor out css enabling and showing into cgroup_apply_control_enable().

* Nest subsystem walk inside child walk.  The child walk will later be
  converted to subtree walk which is a bit more expensive.

* Instead of operating on the differential masks @css_enable, simply
  enable or show csses according to the current cgroup_control() and
  cgroup_ss_mask().  This leads to the same result and is simpler and
  more robust.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Zefan Li <lizefan@huawei.com>
kernel/cgroup.c