diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2021-03-19 17:22:37 +0000 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-04-11 17:41:59 -0600 |
commit | 0d85035a7368a6c6dc91ddeca6da12a50d24164e (patch) | |
tree | 59146c723109531ab4c5f76bc58546f603bf28b2 /fs/io_uring.c | |
parent | 8dd03afe611d371b8c8a2ebeec2720de662a21dc (diff) | |
download | lwn-0d85035a7368a6c6dc91ddeca6da12a50d24164e.tar.gz lwn-0d85035a7368a6c6dc91ddeca6da12a50d24164e.zip |
io_uring: inline io_put_req and friends
One big omission is that io_put_req() haven't been marked inline, and at
least gcc 9 doesn't inline it, not to mention that it's really hot and
extra function call is intolerable, especially when it doesn't put a
final ref.
Signed-off-by: Pavel Begunkov <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 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index ec2533c399f8..74ba816ba71d 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -2166,7 +2166,7 @@ static void io_submit_flush_completions(struct io_comp_state *cs, * Drop reference to request, return next in chain (if there is one) if this * was the last reference to this request. */ -static struct io_kiocb *io_put_req_find_next(struct io_kiocb *req) +static inline struct io_kiocb *io_put_req_find_next(struct io_kiocb *req) { struct io_kiocb *nxt = NULL; @@ -2177,7 +2177,7 @@ static struct io_kiocb *io_put_req_find_next(struct io_kiocb *req) return nxt; } -static void io_put_req(struct io_kiocb *req) +static inline void io_put_req(struct io_kiocb *req) { if (req_ref_put_and_test(req)) io_free_req(req); |