]> git.ipfire.org Git - thirdparty/linux.git/commit
io_uring: unify getting ctx from passed in file descriptor
authorJens Axboe <axboe@kernel.dk>
Wed, 8 Apr 2026 17:56:02 +0000 (11:56 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 8 Apr 2026 19:21:35 +0000 (13:21 -0600)
commitc5e9f6a96bf7379da87df1b852b90527e242b56f
treeaa198f4752e181ef0ceacf264890255e57cc3db8
parentb4d893d636f435701f025e43146d0a4b9a065102
io_uring: unify getting ctx from passed in file descriptor

io_uring_enter() and io_uring_register() end up having duplicated code
for getting a ctx from a passed in file descriptor, for either a
registered ring descriptor or a normal file descriptor. Move the
io_uring_register_get_file() into io_uring.c and name it a bit more
generically, and use it from both callsites rather than have that logic
and handling duplicated.

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