The case were the storage is under quota even before deleting the messages and
the new allocation exceeds the quota limit was tested with reverse logic. The
original test first checks that the allocation is larger than the deletion
(which is ok) and subsequently checks that the excess is *smaller* than the
ceiling, yielding an over-quota result, which made no sense.
if (alloc > (deleted - over))
return TRUE;
} else {
- if (alloc > deleted && (alloc - deleted) < ceil)
+ if (alloc > deleted && (alloc - deleted) > ceil)
return TRUE;
}
} else if (alloc == 0) {