diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2021-09-24 21:59:55 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-10-19 05:49:53 -0600 |
commit | 553deffd0920fc52e8c91e7f8a42d1186a75760a (patch) | |
tree | 4c9a6a9e7dca86a3586d23dfc9a8d43194b21b04 /fs/io_uring.c | |
parent | 1cce17aca621c38c657410dc278a48cda982dd2e (diff) | |
download | lwn-553deffd0920fc52e8c91e7f8a42d1186a75760a.tar.gz lwn-553deffd0920fc52e8c91e7f8a42d1186a75760a.zip |
io_uring: don't pass state to io_submit_state_end
Submission state and ctx and coupled together, no need to passs
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/e22d77a5786ef77e0c49b933ad74bae55cfb6ca6.1632516769.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.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index 693ad31082ae..5088b47d1bc4 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -7137,11 +7137,13 @@ fail_req: /* * Batched submission is done, ensure local IO is flushed out. */ -static void io_submit_state_end(struct io_submit_state *state, - struct io_ring_ctx *ctx) +static void io_submit_state_end(struct io_ring_ctx *ctx) { + struct io_submit_state *state = &ctx->submit_state; + if (state->link.head) io_queue_sqe(state->link.head); + /* flush only after queuing links as they can generate completions */ io_submit_flush_completions(ctx); if (state->plug_started) blk_finish_plug(&state->plug); @@ -7244,7 +7246,7 @@ static int io_submit_sqes(struct io_ring_ctx *ctx, unsigned int nr) percpu_ref_put_many(&ctx->refs, unused); } - io_submit_state_end(&ctx->submit_state, ctx); + io_submit_state_end(ctx); /* Commit SQ ring head once we've consumed and submitted all SQEs */ io_commit_sqring(ctx); |