diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-28 00:39:19 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-28 00:39:19 -0500 |
commit | fb15a78210f169cf39a42df208cff09cdac86574 (patch) | |
tree | f227ba96a6f43853990c06f0f4aea2ca1f6ba059 /lib | |
parent | 5782fd14aaecc72f27473f380ba2044c7598b14a (diff) | |
parent | aaf0f2fa682861e47a4f6a8762d2b8a9a4a51077 (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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/percpu_counter.c | 5 |
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) | |||
176 | spin_lock_irq(&percpu_counters_lock); | 176 | spin_lock_irq(&percpu_counters_lock); |
177 | list_for_each_entry(fbc, &percpu_counters, list) { | 177 | list_for_each_entry(fbc, &percpu_counters, list) { |
178 | s32 *pcount; | 178 | s32 *pcount; |
179 | unsigned long flags; | ||
180 | 179 | ||
181 | raw_spin_lock_irqsave(&fbc->lock, flags); | 180 | raw_spin_lock(&fbc->lock); |
182 | pcount = per_cpu_ptr(fbc->counters, cpu); | 181 | pcount = per_cpu_ptr(fbc->counters, cpu); |
183 | fbc->count += *pcount; | 182 | fbc->count += *pcount; |
184 | *pcount = 0; | 183 | *pcount = 0; |
185 | raw_spin_unlock_irqrestore(&fbc->lock, flags); | 184 | raw_spin_unlock(&fbc->lock); |
186 | } | 185 | } |
187 | spin_unlock_irq(&percpu_counters_lock); | 186 | spin_unlock_irq(&percpu_counters_lock); |
188 | #endif | 187 | #endif |