io_uring: clean up io_uring_register_get_file()
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 16 Jan 2025 02:53:26 +0000 (02:53 +0000)
committerJens Axboe <axboe@kernel.dk>
Tue, 21 Jan 2025 14:07:17 +0000 (07:07 -0700)
commitbb2d76344bc80933a462aa84581d1258e0dc758b
treeb1a35a8f49a7215025c69f47d8d66d2d8efc24d2
parent5719e2823565a304a2afb752d4792c622a693e22
io_uring: clean up io_uring_register_get_file()

Make it always reference the returned file. It's safer, especially with
unregistrations happening under it. And it makes the api cleaner with no
conditional clean ups by the caller.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/0d0b13a63e8edd6b5d360fc821dcdb035cb6b7e0.1736995897.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/register.c
io_uring/rsrc.c