diff options
author | Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> | 2012-03-30 10:10:28 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-03-31 04:43:36 -0400 |
commit | e3831edd59edf57ca11fc289f08961b20baf5146 (patch) | |
tree | 70dfabd35517a97a1127df573d3770848f697e55 /kernel | |
parent | 1f56ee7b68fecd45d25bdcf2eda7507797594424 (diff) |
sched: Fix incorrect usage of for_each_cpu_mask() in select_fallback_rq()
The function for_each_cpu_mask() expects a *pointer* to struct
cpumask as its second argument, whereas select_fallback_rq()
passes the value itself.
And moreover, for_each_cpu_mask() has been marked as obselete
in include/linux/cpumask.h. So move to the more appropriate
for_each_cpu() variant.
Reported-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Dave Jones <davej@redhat.com>
Cc: Liu Chuansheng <chuansheng.liu@intel.com>
Cc: vapier@gentoo.org
Cc: rusty@rustcorp.com.au
Link: http://lkml.kernel.org/r/4F75BED4.9050005@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 985f6e595154..8773176b8c77 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
@@ -1268,7 +1268,7 @@ static int select_fallback_rq(int cpu, struct task_struct *p) | |||
1268 | int dest_cpu; | 1268 | int dest_cpu; |
1269 | 1269 | ||
1270 | /* Look for allowed, online CPU in same node. */ | 1270 | /* Look for allowed, online CPU in same node. */ |
1271 | for_each_cpu_mask(dest_cpu, *nodemask) { | 1271 | for_each_cpu(dest_cpu, nodemask) { |
1272 | if (!cpu_online(dest_cpu)) | 1272 | if (!cpu_online(dest_cpu)) |
1273 | continue; | 1273 | continue; |
1274 | if (!cpu_active(dest_cpu)) | 1274 | if (!cpu_active(dest_cpu)) |
@@ -1279,7 +1279,7 @@ static int select_fallback_rq(int cpu, struct task_struct *p) | |||
1279 | 1279 | ||
1280 | for (;;) { | 1280 | for (;;) { |
1281 | /* Any allowed, online CPU? */ | 1281 | /* Any allowed, online CPU? */ |
1282 | for_each_cpu_mask(dest_cpu, *tsk_cpus_allowed(p)) { | 1282 | for_each_cpu(dest_cpu, tsk_cpus_allowed(p)) { |
1283 | if (!cpu_online(dest_cpu)) | 1283 | if (!cpu_online(dest_cpu)) |
1284 | continue; | 1284 | continue; |
1285 | if (!cpu_active(dest_cpu)) | 1285 | if (!cpu_active(dest_cpu)) |