]> 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)
commit9324fc5d8474a2b994ca7a5e6b07ac9c4cc1554e
treeeb7d3c84c5102506fe222d905761167c9c68373d
parent0bcbe4ba4a48c3a3d99aace0abd26ecaa904f364
cgroup: fix cgroup post-order descendant walk of empty subtree

7d6c2aa5cf ("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