|
@@ -3187,11 +3187,9 @@ css_next_descendant_post(struct cgroup_subsys_state *pos,
|
|
|
|
|
|
WARN_ON_ONCE(!rcu_read_lock_held());
|
|
|
|
|
|
- /* if first iteration, visit the leftmost descendant */
|
|
|
- if (!pos) {
|
|
|
- next = css_leftmost_descendant(root);
|
|
|
- return next != root ? next : NULL;
|
|
|
- }
|
|
|
+ /* if first iteration, visit leftmost descendant which may be @root */
|
|
|
+ if (!pos)
|
|
|
+ return css_leftmost_descendant(root);
|
|
|
|
|
|
/* if we visited @root, we're done */
|
|
|
if (pos == root)
|