]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
io_uring/fdinfo: show SQEs for no array setup
authorKeith Busch <kbusch@kernel.org>
Wed, 22 Oct 2025 20:56:07 +0000 (13:56 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 22 Oct 2025 22:09:41 +0000 (16:09 -0600)
The sq_head indicates the index directly in the submission queue when
the IORING_SETUP_NO_SQARRAY option is used, so use that instead of
skipping showing the entries.

Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/fdinfo.c

index 1a806ad168408c1bd797430d143a5ef93ab13a35..a3ce9218354065a110f9eb4d0731c2b701f3c010 100644 (file)
@@ -96,8 +96,10 @@ static void __io_uring_show_fdinfo(struct io_ring_ctx *ctx, struct seq_file *m)
                u8 opcode;
 
                if (ctx->flags & IORING_SETUP_NO_SQARRAY)
-                       break;
-               sq_idx = READ_ONCE(ctx->sq_array[sq_head & sq_mask]);
+                       sq_idx = sq_head & sq_mask;
+               else
+                       sq_idx = READ_ONCE(ctx->sq_array[sq_head & sq_mask]);
+
                if (sq_idx > sq_mask)
                        continue;