diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2021-08-09 13:04:15 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-08-23 13:07:59 -0600 |
commit | 543af3a13da308f2cea954644b43c2c9f864c350 (patch) | |
tree | 21b95e6f41b74eb896f6ef5a4ec659cbcbaae92c /fs/io_uring.c | |
parent | b9bd2bea0f22f502019266dce368a9cd477ac721 (diff) | |
download | lwn-543af3a13da308f2cea954644b43c2c9f864c350.tar.gz lwn-543af3a13da308f2cea954644b43c2c9f864c350.zip |
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>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r-- | fs/io_uring.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index ee98aebb6580..576100b23147 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) |