|
@@ -82,7 +82,7 @@ void __percpu_counter_add(struct percpu_counter *fbc, s64 amount, s32 batch)
|
|
unsigned long flags;
|
|
unsigned long flags;
|
|
raw_spin_lock_irqsave(&fbc->lock, flags);
|
|
raw_spin_lock_irqsave(&fbc->lock, flags);
|
|
fbc->count += count;
|
|
fbc->count += count;
|
|
- __this_cpu_sub(*fbc->counters, count);
|
|
|
|
|
|
+ __this_cpu_sub(*fbc->counters, count - amount);
|
|
raw_spin_unlock_irqrestore(&fbc->lock, flags);
|
|
raw_spin_unlock_irqrestore(&fbc->lock, flags);
|
|
} else {
|
|
} else {
|
|
this_cpu_add(*fbc->counters, amount);
|
|
this_cpu_add(*fbc->counters, amount);
|