[Patch 23/23] mask v2 - Cpumask tweak in kernel/sched.c

Paul Jackson
2004-04-01T21:57:26Z

Patch_23_of_23 - Cpumask code clarification in kernel/sched.c
Clarify and slightly optimize set_cpus_allowed() cpumask check

Diffstat Patch_23_of_23:
sched.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)

diff -Nru a/kernel/sched.c b/kernel/sched.c
--- a/kernel/sched.c Mon Mar 29 01:04:08 2004
+++ b/kernel/sched.c Mon Mar 29 01:04:08 2004
@@ -2708,7 +2708,7 @@
runqueue_t *rq;

rq = task_rq_lock(p, &flags);
- if (any_online_cpu(new_mask) == NR_CPUS) {
+ if (!cpus_intersects(new_mask, cpu_online_map)) {
ret = -EINVAL;
goto out;
}