• Tejun Heo's avatar
    cgroup: convert cgroup_next_sibling() to cgroup_next_child() · 3b287a50
    Tejun Heo authored
    cgroup is transitioning to using css (cgroup_subsys_state) as the main
    subsys interface handle instead of cgroup and the iterators will be
    updated to use css too.  The iterators need to walk the cgroup
    hierarchy and return the css's matching the origin css, which is a bit
    cumbersome to open code.
    
    This patch converts cgroup_next_sibling() to cgroup_next_child() so
    that it can handle all steps of direct child iteration.  This will be
    used to update iterators to take @css instead of @cgrp.  In addition
    to the new iteration init handling, cgroup_next_child() is
    restructured so that the different branches share the end of iteration
    condition check.
    
    This patch doesn't change any behavior.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Acked-by: default avatarLi Zefan <lizefan@huawei.com>
    3b287a50
cgroup.c 153 KB