net: split out functions related to registering inflight socket files
authorJens Axboe <axboe@kernel.dk>
Fri, 8 Feb 2019 16:01:44 +0000 (09:01 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Aug 2021 10:22:14 +0000 (12:22 +0200)
commiteee65a1282369eedfcbb664d0c865a0ef3eb7017
tree6c3f20b8fe6b797233a777c8d8efcdf499147feb
parent7b6b8db362d2949c09b88ffdfb095796ae854972
net: split out functions related to registering inflight socket files

commit f4e65870e5cede5ca1ec0006b6c9803994e5f7b8 upstream.

We need this functionality for the io_uring file registration, but
we cannot rely on it since CONFIG_UNIX can be modular. Move the helpers
to a separate file, that's always builtin to the kernel if CONFIG_UNIX is
m/y.

No functional changes in this patch, just moving code around.

Reviewed-by: Hannes Reinecke <hare@suse.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
[ backported to older kernels to get access to unix_gc_lock - gregkh ]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/net/af_unix.h
net/Makefile
net/unix/Kconfig
net/unix/Makefile
net/unix/af_unix.c
net/unix/garbage.c
net/unix/scm.c [new file with mode: 0644]
net/unix/scm.h [new file with mode: 0644]