The fcount_incr() was not increasing counter->count when force was set
to true, but fcount_decr() would try to decrease the counter leading to
underflow and assertion failure. Swap the order of the arguments in the
condition, so the !force is evaluated after incrementing the .count.
(cherry picked from commit
8e86e55af19f70d056b3a8f651d75500534463f6)
INSIST(spill > 0);
LOCK(&counter->lock);
- if (!force && ++counter->count > spill) {
+ if (++counter->count > spill && !force) {
counter->count--;
INSIST(counter->count > 0);
counter->dropped++;