diff options
author | Oleg Nesterov <oleg@redhat.com> | 2014-08-13 15:20:03 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-08-20 03:47:18 -0400 |
commit | 5aface53d1a0ef7823215c4078fca8445995d006 (patch) | |
tree | 5ac7f6a4d18b5c1ad7641e10f4ca023508c83b20 | |
parent | 1e4dda08b4c39b3d8f4a3ee7269d49e0200c8af8 (diff) |
sched: Change autogroup_move_group() to use for_each_thread()
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>
-rw-r--r-- | kernel/sched/auto_group.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/kernel/sched/auto_group.c b/kernel/sched/auto_group.c index e73efba98301..8a2e230fb86a 100644 --- a/kernel/sched/auto_group.c +++ b/kernel/sched/auto_group.c | |||
@@ -148,11 +148,8 @@ autogroup_move_group(struct task_struct *p, struct autogroup *ag) | |||
148 | if (!ACCESS_ONCE(sysctl_sched_autogroup_enabled)) | 148 | if (!ACCESS_ONCE(sysctl_sched_autogroup_enabled)) |
149 | goto out; | 149 | goto out; |
150 | 150 | ||
151 | t = p; | 151 | for_each_thread(p, t) |
152 | do { | ||
153 | sched_move_task(t); | 152 | sched_move_task(t); |
154 | } while_each_thread(p, t); | ||
155 | |||
156 | out: | 153 | out: |
157 | unlock_task_sighand(p, &flags); | 154 | unlock_task_sighand(p, &flags); |
158 | autogroup_kref_put(prev); | 155 | autogroup_kref_put(prev); |