summaryrefslogtreecommitdiff
path: root/fs/io_uring.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2022-03-17 05:03:37 +0300
committerJens Axboe <axboe@kernel.dk>2022-03-17 05:11:15 +0300
commit6695490dc85781fe98b782f36f27c13710dbc921 (patch)
tree67704383cb08f27f1b08041db05a8006ae4a13e3 /fs/io_uring.c
parentae4da18941c1c13a9bd6f1d39888ca9a4ff3db91 (diff)
downloadlinux-6695490dc85781fe98b782f36f27c13710dbc921.tar.xz
io_uring: refactor timeout cancellation cqe posting
io_fill_cqe*() is not always the best way to post CQEs just because there is enough of infrastructure on top. Replace a raw call to a variant of it inside of io_timeout_cancel(), which also saves us some bloating and might help with batching later. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/46113ec4345764b4aef3b384ce38cceabaeedcbb.1647481208.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r--fs/io_uring.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index b9013fc14f74..15de14d4331b 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -6471,10 +6471,7 @@ static int io_timeout_cancel(struct io_ring_ctx *ctx, __u64 user_data)
if (IS_ERR(req))
return PTR_ERR(req);
-
- req_set_fail(req);
- io_fill_cqe_req(req, -ECANCELED, 0);
- io_put_req_deferred(req);
+ io_req_task_queue_fail(req, -ECANCELED);
return 0;
}