sched: Change autogroup_move_group() to use for_each_thread()
authorOleg Nesterov <oleg@redhat.com>
Wed, 13 Aug 2014 19:20:03 +0000 (21:20 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 20 Aug 2014 07:47:18 +0000 (09:47 +0200)
Change autogroup_move_group() to use for_each_thread() instead of
buggy while_each_thread().

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <umgwanakikbuti@gmail.com>
Cc: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Frank Mayhar <fmayhar@google.com>
Cc: Frederic Weisbecker <fweisbec@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Sanjay Rao <srao@redhat.com>
Cc: Larry Woodman <lwoodman@redhat.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/20140813192003.GA19334@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/auto_group.c

index e73efba..8a2e230 100644 (file)
@@ -148,11 +148,8 @@ autogroup_move_group(struct task_struct *p, struct autogroup *ag)
        if (!ACCESS_ONCE(sysctl_sched_autogroup_enabled))
                goto out;
 
-       t = p;
-       do {
+       for_each_thread(p, t)
                sched_move_task(t);
-       } while_each_thread(p, t);
-
 out:
        unlock_task_sighand(p, &flags);
        autogroup_kref_put(prev);