aboutsummaryrefslogtreecommitdiffstats
path: root/lib/percpu_counter.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2017-05-02 05:02:41 -0400
committerJiri Kosina <jkosina@suse.cz>2017-05-02 05:02:41 -0400
commit4d6ca227c768b50b05cf183974b40abe444e9d0c (patch)
treebf953d8e895281053548b9967a2c4b58d641df00 /lib/percpu_counter.c
parent800f3eef8ebc1264e9c135bfa892c8ae41fa4792 (diff)
parentaf22a610bc38508d5ea760507d31be6b6983dfa8 (diff)
Merge branch 'for-4.12/asus' into for-linus
Diffstat (limited to 'lib/percpu_counter.c')
-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)
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