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>
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;