]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
io_uring/zcrx: reduce netmem scope in refill
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 16 Sep 2025 14:27:58 +0000 (15:27 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 16 Sep 2025 18:37:20 +0000 (12:37 -0600)
Reduce the scope of a local var netmem in io_zcrx_ring_refill.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/zcrx.c

index 6a5b6f32edc32a4cd262ace94da55f09ebba9733..5f99fc7b43ee1815704e6ce78bb322723565693a 100644 (file)
@@ -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;