]> git.baikalelectronics.ru Git - kernel.git/commit
cgroup: fix cgroup post-order descendant walk of empty subtree
authorTejun Heo <tj@kernel.org>
Fri, 6 Sep 2013 19:31:08 +0000 (15:31 -0400)
committerTejun Heo <tj@kernel.org>
Tue, 10 Sep 2013 13:41:00 +0000 (09:41 -0400)
commit7318dbb19301d0250a986f37869e60a7c4f36a49
treeeb7d3c84c5102506fe222d905761167c9c68373d
parent8529af8ffc1d2e5b6c023faafd87e666e5d4a84a
cgroup: fix cgroup post-order descendant walk of empty subtree

bbafc54afd ("cgroup: make css_for_each_descendant() and friends
include the origin css in the iteration") updated cgroup descendant
iterators to include the origin css; unfortuantely, it forgot to drop
special case handling in css_next_descendant_post() for empty subtree
leading to failure to visit the origin css without any child.

Fix it by dropping the special case handling and always returning the
leftmost descendant on the first iteration.

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