summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2024-07-24 13:16:19 +0200
committerJens Axboe <axboe@kernel.dk>2024-07-24 16:01:49 +0200
commitf1dcdfcadb0c8c13dddd931c1f4dc58e54fdc9c0 (patch)
tree128b12d1bb885f7b3ec9c46c8ec2eae371831ee6
parentio_uring: fix io_match_task must_hold (diff)
downloadlinux-f1dcdfcadb0c8c13dddd931c1f4dc58e54fdc9c0.tar.xz
linux-f1dcdfcadb0c8c13dddd931c1f4dc58e54fdc9c0.zip
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 e0b23d9953b0c ("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>
-rw-r--r--io_uring/uring_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/uring_cmd.c b/io_uring/uring_cmd.c
index a54163a83968..8391c7c7c1ec 100644
--- a/io_uring/uring_cmd.c
+++ b/io_uring/uring_cmd.c
@@ -265,7 +265,7 @@ int io_uring_cmd(struct io_kiocb *req, unsigned int issue_flags)
req_set_fail(req);
io_req_uring_cleanup(req, issue_flags);
io_req_set_res(req, ret, 0);
- return ret < 0 ? ret : IOU_OK;
+ return IOU_OK;
}
int io_uring_cmd_import_fixed(u64 ubuf, unsigned long len, int rw,