From 586a995e0c2575e675204000693531627ea715f5 Mon Sep 17 00:00:00 2001 From: Miao Xie Date: Wed, 7 Jan 2009 18:08:40 -0800 Subject: [PATCH] --- yaml --- r: 127609 b: refs/heads/master c: f5813d94279a18ff5936d675e24b44b44a571197 h: refs/heads/master i: 127607: 48e20e4e90ece37d66b9784c4330f5dca7b1bc74 v: v3 --- [refs] | 2 +- trunk/kernel/cpuset.c | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 7513853677fa..6ba7a2f7f30c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 13337714f3b0307dc7f75ef5d83ecf0db2abbd65 +refs/heads/master: f5813d94279a18ff5936d675e24b44b44a571197 diff --git a/trunk/kernel/cpuset.c b/trunk/kernel/cpuset.c index a841b5c01ef9..6012e326e856 100644 --- a/trunk/kernel/cpuset.c +++ b/trunk/kernel/cpuset.c @@ -1338,10 +1338,14 @@ static void cpuset_attach(struct cgroup_subsys *ss, struct cpuset *oldcs = cgroup_cs(oldcont); int err; - mutex_lock(&callback_mutex); - guarantee_online_cpus(cs, &cpus); + if (cs == &top_cpuset) { + cpus = cpu_possible_map; + } else { + mutex_lock(&callback_mutex); + guarantee_online_cpus(cs, &cpus); + mutex_unlock(&callback_mutex); + } err = set_cpus_allowed_ptr(tsk, &cpus); - mutex_unlock(&callback_mutex); if (err) return;