io_uring: inline fixed part of io_file_get()
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 9 Aug 2021 12:04:02 +0000 (13:04 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 10 Aug 2021 23:51:15 +0000 (17:51 -0600)
commitb9d6d382af4c2ad6fdd56e447c58280a1d894c14
tree1d72b7abb51e6ae458b98d82df1c35bfc44c94b7
parent5133a6714e1254dfe0a9498be2e50f950f39108e
io_uring: inline fixed part of io_file_get()

Optimise io_file_get() with registered files, which is in a hot path,
by inlining parts of the function. Saves a function call, and
inefficiencies of passing arguments, e.g. evaluating
(sqe_flags & IOSQE_FIXED_FILE).

It couldn't have been done before as compilers were refusing to inline
it because of the function size.

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