Commit 73fa880e authored by Pavel Begunkov's avatar Pavel Begunkov Committed by Jens Axboe
Browse files

io_uring/zcrx: reduce netmem scope in refill



Reduce the scope of a local var netmem in io_zcrx_ring_refill.

Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 20dda449
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -755,7 +755,6 @@ static void io_zcrx_ring_refill(struct page_pool *pp,
{
	unsigned int mask = ifq->rq_entries - 1;
	unsigned int entries;
	netmem_ref netmem;

	spin_lock_bh(&ifq->rq_lock);

@@ -771,6 +770,7 @@ static void io_zcrx_ring_refill(struct page_pool *pp,
		struct io_zcrx_area *area;
		struct net_iov *niov;
		unsigned niov_idx, area_idx;
		netmem_ref netmem;

		area_idx = rqe->off >> IORING_ZCRX_AREA_SHIFT;
		niov_idx = (rqe->off & ~IORING_ZCRX_AREA_MASK) >> ifq->niov_shift;