diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2022-11-23 11:33:40 +0000 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-11-23 10:44:01 -0700 |
commit | fa18fa2272c7469e470dcb7bf838ea50a25494ca (patch) | |
tree | 0249df8f4e37d78d79146356c5085afd6d67f569 /io_uring | |
parent | 833b5dfffc26c81835ce38e2a5df9ac5fa142735 (diff) | |
download | linux-fa18fa2272c7469e470dcb7bf838ea50a25494ca.tar.gz linux-fa18fa2272c7469e470dcb7bf838ea50a25494ca.tar.bz2 linux-fa18fa2272c7469e470dcb7bf838ea50a25494ca.zip |
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: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/1923a4dfe80fa877f859a22ed3df2d5fc8ecf02b.1669203009.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 | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index e445344f6f07..a0c71a2dce19 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -814,15 +814,19 @@ bool io_post_aux_cqe(struct io_ring_ctx *ctx, 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 * free_list cache. */ 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_DISARM_MASK) io_disarm_next(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); 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); } |