Skip to content

Commit

Permalink
cpuset.c: remove extra variable
Browse files Browse the repository at this point in the history
Remove the use of int cpus_nonempty variable from 'update_flag' function.

Signed-off-by: Md.Rakib H. Mullick <[email protected]>
Acked-by: Paul Jackson <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
rmullick authored and torvalds committed Oct 20, 2008
1 parent 52d4b9a commit 40b6a76
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions kernel/cpuset.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -1184,15 +1184,14 @@ 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));

mutex_lock(&callback_mutex);
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;
Expand Down

0 comments on commit 40b6a76

Please sign in to comment.