summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2024-03-14 02:54:49 +0300
committerSasha Levin <sashal@kernel.org>2024-03-27 01:21:45 +0300
commit875f5fed30a182675f729f35bbd6ad62b52bd1ac (patch)
treee458c45d243f7f2cc86c6a56f7ce8bcf0e1fb648 /net
parentd35f38551c217d32daa0b7f5008adf1d21226042 (diff)
downloadlinux-875f5fed30a182675f729f35bbd6ad62b52bd1ac.tar.xz
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 'net')
-rw-r--r--net/core/scm.c2
-rw-r--r--net/unix/scm.c4
2 files changed, 2 insertions, 4 deletions
diff --git a/net/core/scm.c b/net/core/scm.c
index 3c7f160720d3..d09849cb60f0 100644
--- a/net/core/scm.c
+++ b/net/core/scm.c
@@ -105,7 +105,7 @@ static int scm_fp_copy(struct cmsghdr *cmsg, struct scm_fp_list **fplp)
if (fd < 0 || !(file = fget_raw(fd)))
return -EBADF;
/* don't allow io_uring files */
- if (io_uring_get_socket(file)) {
+ if (io_is_uring_fops(file)) {
fput(file);
return -EINVAL;
}
diff --git a/net/unix/scm.c b/net/unix/scm.c
index e8e2a00bb0f5..d1048b4c2baa 100644
--- a/net/unix/scm.c
+++ b/net/unix/scm.c
@@ -34,10 +34,8 @@ struct sock *unix_get_socket(struct file *filp)
/* PF_UNIX ? */
if (s && sock->ops && sock->ops->family == PF_UNIX)
u_sock = s;
- } else {
- /* Could be an io_uring instance */
- u_sock = io_uring_get_socket(filp);
}
+
return u_sock;
}
EXPORT_SYMBOL(unix_get_socket);