Commit 40b6a762 authored by Rakib Mullick's avatar Rakib Mullick Committed by Linus Torvalds

cpuset.c: remove extra variable

Remove the use of int cpus_nonempty variable from 'update_flag' function.
Signed-off-by: default avatarMd.Rakib H. Mullick <rakib.mullick@gmail.com>
Acked-by: default avatarPaul Jackson <pj@sgi.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 52d4b9ac
...@@ -1172,7 +1172,7 @@ static int update_flag(cpuset_flagbits_t bit, struct cpuset *cs, ...@@ -1172,7 +1172,7 @@ static int update_flag(cpuset_flagbits_t bit, struct cpuset *cs,
{ {
struct cpuset trialcs; struct cpuset trialcs;
int err; int err;
int cpus_nonempty, balance_flag_changed; int balance_flag_changed;
trialcs = *cs; trialcs = *cs;
if (turning_on) if (turning_on)
...@@ -1184,7 +1184,6 @@ static int update_flag(cpuset_flagbits_t bit, struct cpuset *cs, ...@@ -1184,7 +1184,6 @@ static int update_flag(cpuset_flagbits_t bit, struct cpuset *cs,
if (err < 0) if (err < 0)
return err; return err;
cpus_nonempty = !cpus_empty(trialcs.cpus_allowed);
balance_flag_changed = (is_sched_load_balance(cs) != balance_flag_changed = (is_sched_load_balance(cs) !=
is_sched_load_balance(&trialcs)); is_sched_load_balance(&trialcs));
...@@ -1192,7 +1191,7 @@ static int update_flag(cpuset_flagbits_t bit, struct cpuset *cs, ...@@ -1192,7 +1191,7 @@ static int update_flag(cpuset_flagbits_t bit, struct cpuset *cs,
cs->flags = trialcs.flags; cs->flags = trialcs.flags;
mutex_unlock(&callback_mutex); mutex_unlock(&callback_mutex);
if (cpus_nonempty && balance_flag_changed) if (!cpus_empty(trialcs.cpus_allowed) && balance_flag_changed)
async_rebuild_sched_domains(); async_rebuild_sched_domains();
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment