diff options
author | Ming Lei <ming.lei@redhat.com> | 2022-08-03 14:07:57 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-08-03 16:45:25 +0200 |
commit | ff2557b7224ea9a19fb79eb4bd16d4deef57816a (patch) | |
tree | 54eacb921b4c8c17c3a4903116da2e85968a490e /io_uring/uring_cmd.c | |
parent | Merge tag 'flexible-array-transformations-UAPI-6.0-rc1' of git://git.kernel.o... (diff) | |
download | linux-ff2557b7224ea9a19fb79eb4bd16d4deef57816a.tar.xz linux-ff2557b7224ea9a19fb79eb4bd16d4deef57816a.zip |
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 <asml.silence@gmail.com>
Fixes: de23077eda61f ("io_uring: set completion results upfront")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20220803120757.1668278-1-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/uring_cmd.c')
-rw-r--r-- | io_uring/uring_cmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/uring_cmd.c b/io_uring/uring_cmd.c index 0a421ed51e7e..849d9708d612 100644 --- a/io_uring/uring_cmd.c +++ b/io_uring/uring_cmd.c @@ -46,7 +46,7 @@ void io_uring_cmd_done(struct io_uring_cmd *ioucmd, ssize_t ret, ssize_t res2) if (ret < 0) req_set_fail(req); - io_req_set_res(req, 0, ret); + io_req_set_res(req, ret, 0); if (req->ctx->flags & IORING_SETUP_CQE32) io_req_set_cqe32_extra(req, res2, 0); __io_req_complete(req, 0); |