X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=lib%2Fpercpu_counter.c;h=00f666d944867773f6c9d02587e9dcd449b5b303;hb=0918682be432b85ccd49285832221d9b65831ef5;hp=f61689a96e85e74bca32cb39665d0e3553def495;hpb=4907a43da83184d4e88009654c9b31f5e091f709;p=linux-2.6-microblaze.git diff --git a/lib/percpu_counter.c b/lib/percpu_counter.c index f61689a96e85..00f666d94486 100644 --- 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;