Skip to content

Commit d5e31db

Browse files
isilenceaxboe
authored andcommitted
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>
1 parent bdc0d47 commit d5e31db

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

io_uring/zcrx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ static void io_zcrx_ring_refill(struct page_pool *pp,
787787
continue;
788788

789789
netmem = net_iov_to_netmem(niov);
790-
if (page_pool_unref_netmem(netmem, 1) != 0)
790+
if (!page_pool_unref_and_test(netmem))
791791
continue;
792792

793793
if (unlikely(niov->pp != pp)) {

0 commit comments

Comments
 (0)