[PATCH 1/5] percpu_counter: fix test in __percpu_counter_add_unless_lt()
Alex Elder
aelder at sgi.com
Wed Dec 29 15:49:20 CST 2010
On Wed, 2010-12-29 at 14:56 -0600, Alex Elder wrote:
> if (new_count >= threshold) {
> ret = new_count > threshold;
> fbc->count = fbc_count + amount;
> }
> spin_unlock(&fbc->lock);
>
> return ret;
> }
I obviously didn't test the code I sent, but
you get what I mean... Here is the way one of
the lines above should look:
fbc->count = fbc->count + amount;
Or even better:
fbc->count += amount;
-Alex
More information about the xfs
mailing list