Commit 543af3a1 authored by Pavel Begunkov's avatar Pavel Begunkov Committed by Jens Axboe

io_uring: inline io_free_req_deferred

Inline io_free_req_deferred(), there is no reason to keep it separated.
Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/ce04b7180d4eac0d69dd00677b227eefe80c2cc5.1628471125.git.asml.silence@gmail.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent b9bd2bea
...@@ -2182,16 +2182,12 @@ static inline void io_put_req(struct io_kiocb *req) ...@@ -2182,16 +2182,12 @@ static inline void io_put_req(struct io_kiocb *req)
io_free_req(req); io_free_req(req);
} }
static void io_free_req_deferred(struct io_kiocb *req)
{
req->io_task_work.func = io_free_req;
io_req_task_work_add(req);
}
static inline void io_put_req_deferred(struct io_kiocb *req, int refs) static inline void io_put_req_deferred(struct io_kiocb *req, int refs)
{ {
if (req_ref_sub_and_test(req, refs)) if (req_ref_sub_and_test(req, refs)) {
io_free_req_deferred(req); req->io_task_work.func = io_free_req;
io_req_task_work_add(req);
}
} }
static unsigned io_cqring_events(struct io_ring_ctx *ctx) static unsigned io_cqring_events(struct io_ring_ctx *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