mirror of
https://github.com/torvalds/linux.git
synced 2026-01-12 00:42:35 +08:00
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 <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
bdc0d478a1
commit
d5e31db9a9
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user