summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2022-03-25 11:52:17 +0000
committerJens Axboe <axboe@kernel.dk>2022-04-24 17:34:19 -0600
commit775a1f2f99483bda4e43376ebbc6b459c8fbf20a (patch)
tree2093bce20351bc8fa09b9191958962536e834581 /fs
parent963c6abbb4e4ee3d00ca7992f751c49b38b07e68 (diff)
downloadlinux-775a1f2f99483bda4e43376ebbc6b459c8fbf20a.tar.bz2
io_uring: refactor io_req_add_compl_list()
A small refactoring for io_req_add_compl_list() deduplicating some code. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/f0a5272b45efe4ffc41cb79b99784e39c699aade.1648209006.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs')
-rw-r--r--fs/io_uring.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index ef95829c9ae1..007dc1c14af4 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -1692,11 +1692,10 @@ static void io_prep_async_link(struct io_kiocb *req)
static inline void io_req_add_compl_list(struct io_kiocb *req)
{
- struct io_ring_ctx *ctx = req->ctx;
- struct io_submit_state *state = &ctx->submit_state;
+ struct io_submit_state *state = &req->ctx->submit_state;
if (!(req->flags & REQ_F_CQE_SKIP))
- ctx->submit_state.flush_cqes = true;
+ state->flush_cqes = true;
wq_list_add_tail(&req->comp_list, &state->compl_reqs);
}