io_uring: inline io_free_req_deferred
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 9 Aug 2021 12:04:15 +0000 (13:04 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 23 Aug 2021 19:07:59 +0000 (13:07 -0600)
Inline io_free_req_deferred(), there is no reason to keep it separated.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/ce04b7180d4eac0d69dd00677b227eefe80c2cc5.1628471125.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c

index ee98aeb..576100b 100644 (file)
@@ -2182,16 +2182,12 @@ static inline void io_put_req(struct io_kiocb *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)
 {
-       if (req_ref_sub_and_test(req, refs))
-               io_free_req_deferred(req);
+       if (req_ref_sub_and_test(req, refs)) {
+               req->io_task_work.func = io_free_req;
+               io_req_task_work_add(req);
+       }
 }
 
 static unsigned io_cqring_events(struct io_ring_ctx *ctx)