]> git.baikalelectronics.ru Git - kernel.git/commit
cgroup: update css iteration in cgroup_update_dfl_csses()
authorTejun Heo <tj@kernel.org>
Thu, 3 Mar 2016 14:58:01 +0000 (09:58 -0500)
committerTejun Heo <tj@kernel.org>
Thu, 3 Mar 2016 14:58:01 +0000 (09:58 -0500)
commit199f7863eb13ec5541c9252bdf55615ee059666e
treee20796c4774af75153c7b3ef149eca6b623d5e83
parent0dce8506a9eec3f34c4ace528733eeb160fc4d02
cgroup: update css iteration in cgroup_update_dfl_csses()

The existing sequences of operations ensure that the offlining csses
are drained before cgroup_update_dfl_csses(), so even though
cgroup_update_dfl_csses() uses css_for_each_descendant_pre() to walk
the target cgroups, it doesn't end up operating on dead cgroups.
Also, the function explicitly excludes the subtree root from
operation.

This is fragile and inconsistent with the rest of css update
operations.  This patch updates cgroup_update_dfl_csses() to use
cgroup_for_each_live_descendant_pre() instead and include the subtree
root.

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