summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-02-27 21:39:19 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-02-27 21:39:19 -0800
commitfb15a78210f169cf39a42df208cff09cdac86574 (patch)
treef227ba96a6f43853990c06f0f4aea2ca1f6ba059
parent5782fd14aaecc72f27473f380ba2044c7598b14a (diff)
parentaaf0f2fa682861e47a4f6a8762d2b8a9a4a51077 (diff)
Merge branch 'for-4.11' of git://git.kernel.org/pub/scm/linux/kernel/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
-rw-r--r--lib/percpu_counter.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/percpu_counter.c b/lib/percpu_counter.c
index c8cebb137076..9c21000df0b5 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