]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
io_uring/register: don't get a reference to the registered ring fd
authorJens Axboe <axboe@kernel.dk>
Wed, 8 Apr 2026 17:50:08 +0000 (11:50 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 8 Apr 2026 19:21:35 +0000 (13:21 -0600)
commitb4d893d636f435701f025e43146d0a4b9a065102
tree325bb019b688e22bb32889665edb93f9cab3adcc
parent7880174e1e5e88944ea75cf871efd77ec5e3ef51
io_uring/register: don't get a reference to the registered ring fd

This isn't necessary and was only done because the register path isn't a
hot path and hence the extra ref/put doesn't matter, and to have the
exit path be able to unconditionally put whatever file was gotten
regardless of the type.

In preparation for sharing this code with the main io_uring_enter(2)
syscall, drop the reference and have the caller conditionally put the
file if it was a normal file descriptor.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/register.c
io_uring/rsrc.c