From: Keith Busch 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 --- io_uring/fdinfo.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/io_uring/fdinfo.c b/io_uring/fdinfo.c index 5b26b2a97e1b9..f034786030105 100644 --- a/io_uring/fdinfo.c +++ b/io_uring/fdinfo.c @@ -95,8 +95,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; -- 2.47.3