summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRakib Mullick <rakib.mullick@gmail.com>2008-10-18 20:28:18 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-20 08:52:39 -0700
commit40b6a76237563c70466ec7315f644ba87d57dbe5 (patch)
treeffadb2b18c77e872acdedd00403655b356121e1d
parent52d4b9ac0b985168009c2a57098324e67bae171f (diff)
cpuset.c: remove extra variable
Remove the use of int cpus_nonempty variable from 'update_flag' function. Signed-off-by: Md.Rakib H. Mullick <rakib.mullick@gmail.com> Acked-by: Paul Jackson <pj@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--kernel/cpuset.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index eab7bd6628e0..81d4d2426fd4 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -1172,7 +1172,7 @@ static int update_flag(cpuset_flagbits_t bit, struct cpuset *cs,
{
struct cpuset trialcs;
int err;
- int cpus_nonempty, balance_flag_changed;
+ int balance_flag_changed;
trialcs = *cs;
if (turning_on)
@@ -1184,7 +1184,6 @@ static int update_flag(cpuset_flagbits_t bit, struct cpuset *cs,
if (err < 0)
return err;
- cpus_nonempty = !cpus_empty(trialcs.cpus_allowed);
balance_flag_changed = (is_sched_load_balance(cs) !=
is_sched_load_balance(&trialcs));
@@ -1192,7 +1191,7 @@ static int update_flag(cpuset_flagbits_t bit, struct cpuset *cs,
cs->flags = trialcs.flags;
mutex_unlock(&callback_mutex);
- if (cpus_nonempty && balance_flag_changed)
+ if (!cpus_empty(trialcs.cpus_allowed) && balance_flag_changed)
async_rebuild_sched_domains();
return 0;