Commit b40bb366 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Don't zap the size until we have updated statistics

parent 048ad79c
......@@ -67,8 +67,8 @@ sma_alloc(struct stevedore *st, size_t size)
Lck_Lock(&sma_sc->sma_mtx);
sma_sc->stats->c_req++;
if (sma_sc->sma_alloc + size > sma_sc->sma_max) {
size = 0;
sma_sc->stats->c_fail += size;
size = 0;
} else {
sma_sc->sma_alloc += size;
sma_sc->stats->c_bytes += size;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment