diff options
| author | Jens Axboe <axboe@kernel.dk> | 2024-09-12 09:29:29 -0600 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2024-09-12 10:14:05 -0600 |
| commit | 0b6d253e084a97a05f4970dee06d9a75d29a7bda (patch) | |
| tree | 2cca3cb5daa30ef5b8d479142328d5fff103b819 /io_uring/register.h | |
| parent | bfc0aa7a512f9a4462a88ca7352b00b83f8d68fd (diff) | |
io_uring/register: provide helper to get io_ring_ctx from 'fd'
Can be done in one of two ways:
1) Regular file descriptor, just fget()
2) Registered ring, index our own table for that
In preparation for adding another register use of needing to get a ctx
from a file descriptor, abstract out this helper and use it in the main
register syscall as well.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/register.h')
| -rw-r--r-- | io_uring/register.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/io_uring/register.h b/io_uring/register.h index c9da997d503c..cc69b88338fe 100644 --- a/io_uring/register.h +++ b/io_uring/register.h @@ -4,5 +4,6 @@ int io_eventfd_unregister(struct io_ring_ctx *ctx); int io_unregister_personality(struct io_ring_ctx *ctx, unsigned id); +struct file *io_uring_register_get_file(int fd, bool registered); #endif |
