Skip to content

Commit ff2557b

Browse files
Ming Leiaxboe
authored andcommitted
io_uring: pass correct parameters to io_req_set_res
The two parameters of 'res' and 'cflags' are swapped, so fix it. Without this fix, 'ublk del' hangs forever. Cc: Pavel Begunkov <[email protected]> Fixes: de23077 ("io_uring: set completion results upfront") Signed-off-by: Ming Lei <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent e2b5421 commit ff2557b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

io_uring/uring_cmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void io_uring_cmd_done(struct io_uring_cmd *ioucmd, ssize_t ret, ssize_t res2)
4646
if (ret < 0)
4747
req_set_fail(req);
4848

49-
io_req_set_res(req, 0, ret);
49+
io_req_set_res(req, ret, 0);
5050
if (req->ctx->flags & IORING_SETUP_CQE32)
5151
io_req_set_cqe32_extra(req, res2, 0);
5252
__io_req_complete(req, 0);

0 commit comments

Comments
 (0)