projects/linux·commit fb15a782

Merge branch 'for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu

fb15a782 · Linus Torvalds <[email protected]> · 2017-02-27 21:39:19 -08:00

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
Commit
fb15a78210f169cf39a42df208cff09cdac86574
Parents
5782fd14 · aaf0f2fa

Merge commit. Changes below are compared with the first parent: 5782fd14.

Changes

1 files changed · +2 −3

FileStatusAddDelContent
lib/percpu_counter.cmodified+2−3View file

lib/percpu_counter.c

View file
diff --git a/lib/percpu_counter.c b/lib/percpu_counter.c
index c8cebb1..9c21000 100644
--- a/lib/percpu_counter.c
+++ b/lib/percpu_counter.c
@@ -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