io_uring: don't pass around fixed index for scm
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 7 Apr 2022 12:40:03 +0000 (13:40 +0100)
committerJens Axboe <axboe@kernel.dk>
Sun, 24 Apr 2022 23:34:19 +0000 (17:34 -0600)
commite390510af0461e743a8f0031fc235552c40778f9
tree86222fb8824f3d12eb2419c59a407c09fdcc5138
parentdca58c6a08a92c5c674140047de7f72f9cc843d0
io_uring: don't pass around fixed index for scm

There is an old API nuisance where io_uring's SCM accounting functions
traverse fixed file tables and so requires them to be set in advance,
which leads to some implicit rules of how io_sqe_file_register() should
be used.

__io_sqe_files_scm() now works with only one file at a time, pass a file
directly and get rid of all fixed table dereferencing inside. Clean
io_sqe_file_register() callers.

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