Skip to content

Commit 29d63b9

Browse files
isilenceaxboe
authored andcommitted
io_uring: align iowq and task request error handling
There is a difference in how io_queue_sqe and io_wq_submit_work treat error codes they get from io_issue_sqe. The first one fails anything unknown but latter only fails when the code is negative. It doesn't make sense to have this discrepancy, align them to the io_queue_sqe behaviour. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/c550e152bf4a290187f91a4322ddcb5d6d1f2c73.1721819383.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent a2b72b8 commit 29d63b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

io_uring/io_uring.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1849,7 +1849,7 @@ void io_wq_submit_work(struct io_wq_work *work)
18491849
} while (1);
18501850

18511851
/* avoid locking problems by failing it from a clean context */
1852-
if (ret < 0)
1852+
if (ret)
18531853
io_req_task_queue_fail(req, ret);
18541854
}
18551855

0 commit comments

Comments
 (0)