Commit fa18fa22 authored by Pavel Begunkov's avatar Pavel Begunkov Committed by Jens Axboe

io_uring: inline __io_req_complete_put()

Inline __io_req_complete_put() into io_req_complete_post(), there are no
other users.
Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/1923a4dfe80fa877f859a22ed3df2d5fc8ecf02b.1669203009.git.asml.silence@gmail.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 833b5dff
...@@ -814,15 +814,19 @@ bool io_post_aux_cqe(struct io_ring_ctx *ctx, ...@@ -814,15 +814,19 @@ bool io_post_aux_cqe(struct io_ring_ctx *ctx,
return filled; return filled;
} }
static void __io_req_complete_put(struct io_kiocb *req) void io_req_complete_post(struct io_kiocb *req)
{ {
struct io_ring_ctx *ctx = req->ctx;
io_cq_lock(ctx);
if (!(req->flags & REQ_F_CQE_SKIP))
__io_fill_cqe_req(ctx, req);
/* /*
* If we're the last reference to this request, add to our locked * If we're the last reference to this request, add to our locked
* free_list cache. * free_list cache.
*/ */
if (req_ref_put_and_test(req)) { if (req_ref_put_and_test(req)) {
struct io_ring_ctx *ctx = req->ctx;
if (req->flags & IO_REQ_LINK_FLAGS) { if (req->flags & IO_REQ_LINK_FLAGS) {
if (req->flags & IO_DISARM_MASK) if (req->flags & IO_DISARM_MASK)
io_disarm_next(req); io_disarm_next(req);
...@@ -843,16 +847,6 @@ static void __io_req_complete_put(struct io_kiocb *req) ...@@ -843,16 +847,6 @@ static void __io_req_complete_put(struct io_kiocb *req)
wq_list_add_head(&req->comp_list, &ctx->locked_free_list); wq_list_add_head(&req->comp_list, &ctx->locked_free_list);
ctx->locked_free_nr++; ctx->locked_free_nr++;
} }
}
void io_req_complete_post(struct io_kiocb *req)
{
struct io_ring_ctx *ctx = req->ctx;
io_cq_lock(ctx);
if (!(req->flags & REQ_F_CQE_SKIP))
__io_fill_cqe_req(ctx, req);
__io_req_complete_put(req);
io_cq_unlock_post(ctx); io_cq_unlock_post(ctx);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment