diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2023-01-16 16:49:01 +0000 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-01-29 15:17:41 -0700 |
commit | 68a2cc1bba98144340f6ed66f3aed57e914766d0 (patch) | |
tree | 6f14340c6eacb77c046c4051f5edece009615983 /io_uring | |
parent | 632ffe0956740ba56ae3f83778f3bf97edd57c69 (diff) |
io_uring: refactor __io_req_complete_post
Keep parts of __io_req_complete_post() relying on req->flags together so
the value can be cached.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/2b4fbb42f404a0e75c4d9f0a5b16f314a839d0a9.1673887636.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring')
-rw-r--r-- | io_uring/io_uring.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index c314dc111d5d..597b757e791e 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -974,14 +974,14 @@ static void __io_req_complete_post(struct io_kiocb *req) req->link = NULL; } } + io_put_kbuf_comp(req); + io_dismantle_req(req); io_req_put_rsrc(req); /* * Selected buffer deallocation in io_clean_op() assumes that * we don't hold ->completion_lock. Clean them here to avoid * deadlocks. */ - io_put_kbuf_comp(req); - io_dismantle_req(req); io_put_task(req->task, 1); wq_list_add_head(&req->comp_list, &ctx->locked_free_list); ctx->locked_free_nr++; |