Skip to content

Commit f1dcdfc

Browse files
isilenceaxboe
authored andcommitted
io_uring: simplify io_uring_cmd return
We don't have to return error code from an op handler back to core io_uring, so once io_uring_cmd() sets the results and handles errors we can juts return IOU_OK and simplify the code. Note, only valid with e0b23d9 ("io_uring: optimise ltimeout for inline execution"), there was a problem with iopoll before. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/8eae2be5b2a49236cd5f1dadbd1aa5730e9e2d4f.1721819383.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent e142e9c commit f1dcdfc

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
@@ -265,7 +265,7 @@ int io_uring_cmd(struct io_kiocb *req, unsigned int issue_flags)
265265
req_set_fail(req);
266266
io_req_uring_cleanup(req, issue_flags);
267267
io_req_set_res(req, ret, 0);
268-
return ret < 0 ? ret : IOU_OK;
268+
return IOU_OK;
269269
}
270270

271271
int io_uring_cmd_import_fixed(u64 ubuf, unsigned long len, int rw,

0 commit comments

Comments
 (0)