diff options
-rw-r--r-- | kernel/cgroup.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index e0aeb32415ff..8075b72d22be 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -3187,11 +3187,9 @@ css_next_descendant_post(struct cgroup_subsys_state *pos, | |||
3187 | 3187 | ||
3188 | WARN_ON_ONCE(!rcu_read_lock_held()); | 3188 | WARN_ON_ONCE(!rcu_read_lock_held()); |
3189 | 3189 | ||
3190 | /* if first iteration, visit the leftmost descendant */ | 3190 | /* if first iteration, visit leftmost descendant which may be @root */ |
3191 | if (!pos) { | 3191 | if (!pos) |
3192 | next = css_leftmost_descendant(root); | 3192 | return css_leftmost_descendant(root); |
3193 | return next != root ? next : NULL; | ||
3194 | } | ||
3195 | 3193 | ||
3196 | /* if we visited @root, we're done */ | 3194 | /* if we visited @root, we're done */ |
3197 | if (pos == root) | 3195 | if (pos == root) |