diff options
author | Jens Axboe <axboe@kernel.dk> | 2024-03-13 17:54:49 -0600 |
---|---|---|
committer | Sasha Levin <sashal@kernel.org> | 2024-03-26 18:21:45 -0400 |
commit | 875f5fed30a182675f729f35bbd6ad62b52bd1ac (patch) | |
tree | e458c45d243f7f2cc86c6a56f7ce8bcf0e1fb648 /io_uring | |
parent | d35f38551c217d32daa0b7f5008adf1d21226042 (diff) | |
download | linux-stable-875f5fed30a182675f729f35bbd6ad62b52bd1ac.tar.gz linux-stable-875f5fed30a182675f729f35bbd6ad62b52bd1ac.tar.bz2 linux-stable-875f5fed30a182675f729f35bbd6ad62b52bd1ac.zip |
io_uring/unix: drop usage of io_uring socket
Commit a4104821ad651d8a0b374f0b2474c345bbb42f82 upstream.
Since we no longer allow sending io_uring fds over SCM_RIGHTS, move to
using io_is_uring_fops() to detect whether this is a io_uring fd or not.
With that done, kill off io_uring_get_socket() as nobody calls it
anymore.
This is in preparation to yanking out the rest of the core related to
unix gc with io_uring.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'io_uring')
-rw-r--r-- | io_uring/io_uring.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 936abc6ee450..a80c808d3a0e 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -1113,19 +1113,6 @@ static struct kmem_cache *req_cachep; static const struct file_operations io_uring_fops; -struct sock *io_uring_get_socket(struct file *file) -{ -#if defined(CONFIG_UNIX) - if (file->f_op == &io_uring_fops) { - struct io_ring_ctx *ctx = file->private_data; - - return ctx->ring_sock->sk; - } -#endif - return NULL; -} -EXPORT_SYMBOL(io_uring_get_socket); - static inline void io_tw_lock(struct io_ring_ctx *ctx, bool *locked) { if (!*locked) { @@ -10275,6 +10262,11 @@ static const struct file_operations io_uring_fops = { #endif }; +bool io_is_uring_fops(struct file *file) +{ + return file->f_op == &io_uring_fops; +} + static int io_allocate_scq_urings(struct io_ring_ctx *ctx, struct io_uring_params *p) { |