]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: pools: don't needlessly set a call mark during refilling of caches
authorWilly Tarreau <w@1wt.eu>
Mon, 14 Feb 2022 08:26:59 +0000 (09:26 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 14 Feb 2022 19:10:43 +0000 (20:10 +0100)
When refilling caches from the shared cache, it's pointless to set the
pointer to the local pool since it may be overwritten immediately after
by the LIST_INSERT(). This is a leftover from the pre-2.4 code in fact.
It didn't hurt, though.

src/pool.c

index 70a80410d7b23322139fff96a22b5536b591f122..0bb79d0253ba7e47bce8a37cb032b047daa8a1b0 100644 (file)
@@ -478,9 +478,6 @@ void pool_refill_local_from_shared(struct pool_head *pool, struct pool_cache_hea
        count = 0;
        for (; ret; ret = down) {
                down = ret->down;
-               /* keep track of where the element was allocated from */
-               POOL_DEBUG_SET_MARK(pool, ret);
-
                item = (struct pool_cache_item *)ret;
                POOL_DEBUG_TRACE_CALLER(pool, item, NULL);
                LIST_INSERT(&pch->list, &item->by_pool);