cgroup: factor out cgroup_drain_offline() 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)
commit1b9b96a12b5433ccc477265111122720ccb4965e
treeadf76d451462fbd1e6bf26b4821948726fc5b4b6
parent5531dc915ba10b78a80dcffa48d7360d3c0bab61
cgroup: factor out cgroup_drain_offline() from cgroup_subtree_control_write()

Factor out async css offline draining into cgroup_drain_offline().

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

* Relocate the draining above subsystem mask preparation, which
  doesn't create any behavior differences but helps further
  refactoring.

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