summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-02-28 06:39:19 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2017-02-28 06:39:19 +0100
commitfb15a78210f169cf39a42df208cff09cdac86574 (patch)
treef227ba96a6f43853990c06f0f4aea2ca1f6ba059 /lib
parentMerge tag 'rtc-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/abellon... (diff)
parentpercpu_counter: percpu_counter_hotcpu_callback() cleanup (diff)
downloadlinux-fb15a78210f169cf39a42df208cff09cdac86574.tar.xz
linux-fb15a78210f169cf39a42df208cff09cdac86574.zip
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
Diffstat (limited to 'lib')
-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