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>
Thu, 16 Jan 2025 14:13:08 +0000 (07:13 -0700)
commit4415be009035b67b9101cf96b02cfee95621b3a6
treee0a83f052c9467181354a9e5d42bad3a3f95638c
parent8865af703c087b8bcc2fdd04b6a93d3cc0fb0e9f
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