summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2021-08-09 13:04:15 +0100
committerJens Axboe <axboe@kernel.dk>2021-08-10 17:51:41 -0600
commit74e739d99ea897a96f7a3d1333ef2f128d1e8c6c (patch)
treec171de4021b8b8155a292cef07e563eaa6e64374
parent003cda4b07d82bb1acf8f9fd6463767c64819b7a (diff)
io_uring: inline io_free_req_deferred
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>
-rw-r--r--fs/io_uring.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index c2f5aa5967ea..22f4d81f8f8c 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -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)