Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217578
b: refs/heads/master
c: ea00c30
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed Oct 26, 2010
1 parent c4b20c0 commit dbbb816
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 041b78f232bb87b2de8ca3fed50384bc7dc9c2de
refs/heads/master: ea00c30b5b31baa91be29bee966204eccc15e9d3
6 changes: 3 additions & 3 deletions trunk/lib/percpu_counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);

Expand Down

0 comments on commit dbbb816

Please sign in to comment.