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, 17 Apr 2022 22:52:13 +0000 (16:52 -0600)
commitb9feb6f08fb0da3a89ac145ae67218c610a4f858
tree35d3d9092ddc2faee268921f7eb76a231398b931
parent8e954a2c5278cc05909cb587d8d08d49184f0336
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