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

Don't have mempool->free police the max parameter, leave that to

the guard.  This makes 'max' parameter mis-sizing much less problematic.

Spotted by:	scoof
parent 0f7d9a36
......@@ -329,9 +329,6 @@ MPL_Free(struct mempool *mpl, void *item)
if (mi->size < *mpl->cur_size) {
mpl->vsc->toosmall++;
VTAILQ_INSERT_HEAD(&mpl->surplus, mi, list);
} else if (mpl->n_pool >= mpl->param->max_pool) {
mpl->vsc->surplus++;
VTAILQ_INSERT_HEAD(&mpl->surplus, mi, list);
} else {
mpl->vsc->pool = ++mpl->n_pool;
mi->touched = mpl->t_now;
......
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