diff options
| author | Ingo Molnar <mingo@kernel.org> | 2014-01-16 09:33:30 +0100 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2014-01-16 09:33:30 +0100 |
| commit | 860fc2f2640ec348b9520ca4649b1bfd23d91bc2 (patch) | |
| tree | 73d90d6ef86893c89bb70e78a2b63295d531f371 /lib | |
| parent | 197749981e539c1eb5863f417de6dd4e2c02b76c (diff) | |
| parent | bee09ed91cacdbffdbcd3b05de8409c77ec9fcd6 (diff) | |
Merge branch 'perf/urgent' into perf/core
Pick up the latest fixes, refresh the development tree.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/percpu_counter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/percpu_counter.c b/lib/percpu_counter.c index 7473ee3b4ee7..1da85bb1bc07 100644 --- a/lib/percpu_counter.c +++ b/lib/percpu_counter.c @@ -82,10 +82,10 @@ void __percpu_counter_add(struct percpu_counter *fbc, s64 amount, s32 batch) unsigned long flags; raw_spin_lock_irqsave(&fbc->lock, flags); fbc->count += count; + __this_cpu_sub(*fbc->counters, count); raw_spin_unlock_irqrestore(&fbc->lock, flags); - __this_cpu_write(*fbc->counters, 0); } else { - __this_cpu_write(*fbc->counters, count); + this_cpu_add(*fbc->counters, amount); } preempt_enable(); } |
