From d5e31db9a950f1edfa20a59e7105e9cc78135493 Mon Sep 17 00:00:00 2001 From: Pavel Begunkov Date: Tue, 16 Sep 2025 15:27:46 +0100 Subject: [PATCH] io_uring/zcrx: use page_pool_unref_and_test() page_pool_unref_and_test() tries to better follow usuall refcount semantics, use it instead of page_pool_unref_netmem(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe --- io_uring/zcrx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c index a4a0560e82693..bd2fb3688432c 100644 --- a/io_uring/zcrx.c +++ b/io_uring/zcrx.c @@ -787,7 +787,7 @@ static void io_zcrx_ring_refill(struct page_pool *pp, continue; netmem = net_iov_to_netmem(niov); - if (page_pool_unref_netmem(netmem, 1) != 0) + if (!page_pool_unref_and_test(netmem)) continue; if (unlikely(niov->pp != pp)) { -- 2.47.3