[PATCH 5/6] core: use cpumask_copy instead of = for cpus_allowedin fork

From: Yinghai Lu
Date: Sat Jun 06 2009 - 17:56:26 EST



so later could use nr_cpumask_bits in cpumask_size when MAXSMP is used

Signed-off-by: Yinghai Lu <yinghai@xxxxxxxxxx>

---
arch/x86/kernel/cpu/cpufreq/powernow-k8.c | 52 ++++++++++++++++++++----------
kernel/fork.c | 2 -
2 files changed, 36 insertions(+), 18 deletions(-)

Index: linux-2.6/kernel/fork.c
===================================================================
--- linux-2.6.orig/kernel/fork.c
+++ linux-2.6/kernel/fork.c
@@ -1207,7 +1207,7 @@ static struct task_struct *copy_process(
* to ensure it is on a valid CPU (and if not, just force it back to
* parent's CPU). This avoids alot of nasty races.
*/
- p->cpus_allowed = current->cpus_allowed;
+ cpumask_copy(&p->cpus_allowed, &current->cpus_allowed);
p->rt.nr_cpus_allowed = current->rt.nr_cpus_allowed;
if (unlikely(!cpu_isset(task_cpu(p), p->cpus_allowed) ||
!cpu_online(task_cpu(p))))
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/