af_unix: Explicitly include headers for non-pointer struct fields.
authorKuniyuki Iwashima <kuniyu@amazon.com>
Tue, 18 Mar 2025 03:48:50 +0000 (20:48 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 25 Mar 2025 11:30:07 +0000 (04:30 -0700)
commit3056172a261c88fc834147f6427b09dfe4d4290b
tree5f0bedb96487dad26f4b7c507ffea30d5fc2a066
parent84960bf2403123a5a15711d050455e195a8d5ba3
af_unix: Explicitly include headers for non-pointer struct fields.

include/net/af_unix.h indirectly includes some definitions for structs.

Let's include such headers explicitly.

  linux/atomic.h   : scm_stat.nr_fds
  linux/net.h      : unix_sock.peer_wq
  linux/path.h     : unix_sock.path
  linux/spinlock.h : unix_sock.lock
  linux/wait.h     : unix_sock.peer_wake
  uapi/linux/un.h  : unix_address.name[]

linux/socket.h is removed as the structs there are not used directly,
and linux/un.h is clarified with uapi as un.h only exists under
include/uapi.

While at it, duplicate headers are removed from .c files.

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://patch.msgid.link/20250318034934.86708-4-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/af_unix.h
net/unix/af_unix.c
net/unix/diag.c
net/unix/garbage.c
net/unix/unix_bpf.c