aboutsummaryrefslogtreecommitdiffstats
path: root/lib/percpu_counter.c
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-08-15 14:11:45 -0400
committerSage Weil <sage@inktank.com>2013-08-15 14:11:45 -0400
commitee3e542fec6e69bc9fb668698889a37d93950ddf (patch)
treee74ee766a4764769ef1d3d45d266b4dea64101d3 /lib/percpu_counter.c
parentfe2a801b50c0bb8039d627e5ae1fec249d10ff39 (diff)
parentf1d6e17f540af37bb1891480143669ba7636c4cf (diff)
Merge remote-tracking branch 'linus/master' into testing
Diffstat (limited to 'lib/percpu_counter.c')
-rw-r--r--lib/percpu_counter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/percpu_counter.c b/lib/percpu_counter.c
index ba6085d9c741..93c5d5ecff4e 100644
--- a/lib/percpu_counter.c
+++ b/lib/percpu_counter.c
@@ -80,8 +80,8 @@ void __percpu_counter_add(struct percpu_counter *fbc, s64 amount, s32 batch)
80 if (count >= batch || count <= -batch) { 80 if (count >= batch || count <= -batch) {
81 raw_spin_lock(&fbc->lock); 81 raw_spin_lock(&fbc->lock);
82 fbc->count += count; 82 fbc->count += count;
83 __this_cpu_write(*fbc->counters, 0);
84 raw_spin_unlock(&fbc->lock); 83 raw_spin_unlock(&fbc->lock);
84 __this_cpu_write(*fbc->counters, 0);
85 } else { 85 } else {
86 __this_cpu_write(*fbc->counters, count); 86 __this_cpu_write(*fbc->counters, count);
87 } 87 }
@@ -158,7 +158,7 @@ static void compute_batch_value(void)
158 percpu_counter_batch = max(32, nr*2); 158 percpu_counter_batch = max(32, nr*2);
159} 159}
160 160
161static int __cpuinit percpu_counter_hotcpu_callback(struct notifier_block *nb, 161static int percpu_counter_hotcpu_callback(struct notifier_block *nb,
162 unsigned long action, void *hcpu) 162 unsigned long action, void *hcpu)
163{ 163{
164#ifdef CONFIG_HOTPLUG_CPU 164#ifdef CONFIG_HOTPLUG_CPU