]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
io_uring/zcrx: remove extra ifq close
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 19 May 2026 11:44:29 +0000 (12:44 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 26 May 2026 16:42:01 +0000 (10:42 -0600)
By the time io_zcrx_ifq_free() is called the interface queue should
already be closed, so io_close_queue() will be a no-op. Remove the call
and add a couple of warnings.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://patch.msgid.link/be6c4a283a5bab5440e22fbccafe7b885acb7abc.1779189667.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/zcrx.c

index 4a1aea3172874ab5cd4d3827124b634083ab0e06..d610e0f9684484299d0a53b618d089897fc859d1 100644 (file)
@@ -574,7 +574,10 @@ static void io_close_queue(struct io_zcrx_ifq *ifq)
 
 static void io_zcrx_ifq_free(struct io_zcrx_ifq *ifq)
 {
-       io_close_queue(ifq);
+       if (WARN_ON_ONCE(ifq->if_rxq != -1))
+               return;
+       if (WARN_ON_ONCE(ifq->netdev != NULL))
+               return;
 
        if (ifq->area)
                io_zcrx_free_area(ifq, ifq->area);