diff --git a/[refs] b/[refs] index b140cc24273c..7e95d1076281 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 041b78f232bb87b2de8ca3fed50384bc7dc9c2de +refs/heads/master: ea00c30b5b31baa91be29bee966204eccc15e9d3 diff --git a/trunk/lib/percpu_counter.c b/trunk/lib/percpu_counter.c index 1d954ea72331..604678d7d06d 100644 --- a/trunk/lib/percpu_counter.c +++ b/trunk/lib/percpu_counter.c @@ -73,9 +73,9 @@ void __percpu_counter_add(struct percpu_counter *fbc, s64 amount, s32 batch) { s64 count; s32 *pcount; - int cpu = get_cpu(); - pcount = per_cpu_ptr(fbc->counters, cpu); + preempt_disable(); + pcount = this_cpu_ptr(fbc->counters); count = *pcount + amount; if (count >= batch || count <= -batch) { spin_lock(&fbc->lock); @@ -85,7 +85,7 @@ void __percpu_counter_add(struct percpu_counter *fbc, s64 amount, s32 batch) } else { *pcount = count; } - put_cpu(); + preempt_enable(); } EXPORT_SYMBOL(__percpu_counter_add);