summaryrefslogtreecommitdiffstats
path: root/include/net/af_unix.h
diff options
context:
space:
mode:
authorKuniyuki Iwashima <kuniyu@amazon.com>2024-01-23 09:08:54 -0800
committerJakub Kicinski <kuba@kernel.org>2024-01-26 20:34:25 -0800
commit5b17307bd0789edea0675d524a2b277b93bbde62 (patch)
tree12578ed97ff17461f11530773e48c2ab9ecff385 /include/net/af_unix.h
parent97af84a6bba2ab2b9c704c08e67de3b5ea551bb2 (diff)
downloadlinux-5b17307bd0789edea0675d524a2b277b93bbde62.tar.gz
linux-5b17307bd0789edea0675d524a2b277b93bbde62.tar.bz2
linux-5b17307bd0789edea0675d524a2b277b93bbde62.zip
af_unix: Return struct unix_sock from unix_get_socket().
Currently, unix_get_socket() returns struct sock, but after calling it, we always cast it to unix_sk(). Let's return struct unix_sock from unix_get_socket(). Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Acked-by: Pavel Begunkov <asml.silence@gmail.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://lore.kernel.org/r/20240123170856.41348-4-kuniyu@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/af_unix.h')
-rw-r--r--include/net/af_unix.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/af_unix.h b/include/net/af_unix.h
index ac38b63db554..2c98ef95017b 100644
--- a/include/net/af_unix.h
+++ b/include/net/af_unix.h
@@ -14,7 +14,7 @@ void unix_destruct_scm(struct sk_buff *skb);
void io_uring_destruct_scm(struct sk_buff *skb);
void unix_gc(void);
void wait_for_unix_gc(void);
-struct sock *unix_get_socket(struct file *filp);
+struct unix_sock *unix_get_socket(struct file *filp);
struct sock *unix_peer_get(struct sock *sk);
#define UNIX_HASH_MOD (256 - 1)