summaryrefslogtreecommitdiffstats
path: root/io_uring
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2024-03-13 17:54:49 -0600
committerSasha Levin <sashal@kernel.org>2024-03-26 18:21:45 -0400
commit875f5fed30a182675f729f35bbd6ad62b52bd1ac (patch)
treee458c45d243f7f2cc86c6a56f7ce8bcf0e1fb648 /io_uring
parentd35f38551c217d32daa0b7f5008adf1d21226042 (diff)
downloadlinux-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.c18
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)
{