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

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