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 09:58:01 +0000 (11:58 +0200)
commit1f02ba8b5b42fe25cab3d8e6f400e10c4c688700
tree7a72dea0f9f07d4b4ab2275aefa5a7f9648b7c17
parent088f160d6f6dc06cf858e864ba8e81548387af1e
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]