Skip to content

Commit

Permalink
Merge branch 'for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…git/tj/percpu

Pull percpu update from Tejun Heo:
 "This contains just one minor cleanup patch which gets rid of an
  unnecessary irqsave/restore in the cpu dead callback"

* 'for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
  percpu_counter: percpu_counter_hotcpu_callback() cleanup
  • Loading branch information
torvalds committed Feb 28, 2017
2 parents 5782fd1 + aaf0f2f commit fb15a78
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/percpu_counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,12 @@ static int percpu_counter_cpu_dead(unsigned int cpu)
spin_lock_irq(&percpu_counters_lock);
list_for_each_entry(fbc, &percpu_counters, list) {
s32 *pcount;
unsigned long flags;

raw_spin_lock_irqsave(&fbc->lock, flags);
raw_spin_lock(&fbc->lock);
pcount = per_cpu_ptr(fbc->counters, cpu);
fbc->count += *pcount;
*pcount = 0;
raw_spin_unlock_irqrestore(&fbc->lock, flags);
raw_spin_unlock(&fbc->lock);
}
spin_unlock_irq(&percpu_counters_lock);
#endif
Expand Down

0 comments on commit fb15a78

Please sign in to comment.