projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
lib/percpu_counter.c: use helper macro abs()
[linux-2.6-block.git]
/
lib
/
percpu_counter.c
diff --git
a/lib/percpu_counter.c
b/lib/percpu_counter.c
index f61689a96e85e74bca32cb39665d0e3553def495..00f666d944867773f6c9d02587e9dcd449b5b303 100644
(file)
--- a/
lib/percpu_counter.c
+++ b/
lib/percpu_counter.c
@@
-85,7
+85,7
@@
void percpu_counter_add_batch(struct percpu_counter *fbc, s64 amount, s32 batch)
preempt_disable();
count = __this_cpu_read(*fbc->counters) + amount;
- if (
count >= batch || count <= -
batch) {
+ if (
abs(count) >=
batch) {
unsigned long flags;
raw_spin_lock_irqsave(&fbc->lock, flags);
fbc->count += count;