summaryrefslogtreecommitdiff
path: root/net/unix/garbage.c
diff options
context:
space:
mode:
authorKuniyuki Iwashima <kuniyu@amazon.com>2025-03-17 20:48:49 -0700
committerJakub Kicinski <kuba@kernel.org>2025-03-25 04:30:07 -0700
commit84960bf2403123a5a15711d050455e195a8d5ba3 (patch)
treefa039d6a0f8f3038b5a5fd028c620587c43d2228 /net/unix/garbage.c
parentf9af583a2c769962de599f64627829d5b7a8e5f2 (diff)
af_unix: Move internal definitions to net/unix/.
net/af_unix.h is included by core and some LSMs, but most definitions need not be. Let's move struct unix_{vertex,edge} to net/unix/garbage.c and other definitions to net/unix/af_unix.h. Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Reviewed-by: Joe Damato <jdamato@fastly.com> Link: https://patch.msgid.link/20250318034934.86708-3-kuniyu@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/unix/garbage.c')
-rw-r--r--net/unix/garbage.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/net/unix/garbage.c b/net/unix/garbage.c
index 6a641d4b5542..8c8c7360349d 100644
--- a/net/unix/garbage.c
+++ b/net/unix/garbage.c
@@ -80,6 +80,24 @@
#include <net/sock.h>
#include <net/tcp_states.h>
+#include "af_unix.h"
+
+struct unix_vertex {
+ struct list_head edges;
+ struct list_head entry;
+ struct list_head scc_entry;
+ unsigned long out_degree;
+ unsigned long index;
+ unsigned long scc_index;
+};
+
+struct unix_edge {
+ struct unix_sock *predecessor;
+ struct unix_sock *successor;
+ struct list_head vertex_entry;
+ struct list_head stack_entry;
+};
+
struct unix_sock *unix_get_socket(struct file *filp)
{
struct inode *inode = file_inode(filp);