]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - fs/io_uring.c
io_uring: deduplicate file table slot calculation
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 4 Feb 2021 13:52:07 +0000 (13:52 +0000)
committerJens Axboe <axboe@kernel.dk>
Thu, 4 Feb 2021 15:05:46 +0000 (08:05 -0700)
commitea64ec02b31d5b05ae94ac4d57e38f8a02117c76
tree76563082ac8ad7c8f248a2a026efc02cb31127f8
parent847595de1732a6e928f241929d24dde2e9ffaf15
io_uring: deduplicate file table slot calculation

Extract a helper io_fixed_file_slot() returning a place in our fixed
files table, so we don't hand-code it three times in the code.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c