Skip to content

Commit

Permalink
io_uring: refactor io_req_add_compl_list()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pavel Begunkov authored and Jens Axboe committed Apr 24, 2022
1 parent 963c6ab commit 775a1f2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions fs/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 775a1f2

Please sign in to comment.