Skip to content

Commit a9c3eda

Browse files
Kanchan Joshiaxboe
authored andcommitted
io_uring: fix submission-failure handling for uring-cmd
If ->uring_cmd returned an error value different from -EAGAIN or -EIOCBQUEUED, it gets overridden with IOU_OK. This invites trouble as caller (io_uring core code) handles IOU_OK differently than other error codes. Fix this by returning the actual error code. Signed-off-by: Kanchan Joshi <joshi.k@samsung.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 47abea0 commit a9c3eda

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

io_uring/uring_cmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ int io_uring_cmd(struct io_kiocb *req, unsigned int issue_flags)
112112
if (ret < 0)
113113
req_set_fail(req);
114114
io_req_set_res(req, ret, 0);
115-
return IOU_OK;
115+
return ret;
116116
}
117117

118118
return IOU_ISSUE_SKIP_COMPLETE;

0 commit comments

Comments
 (0)