fs: split receive_fd_replace from __receive_fd
authorChristoph Hellwig <hch@lst.de>
Thu, 25 Mar 2021 08:22:09 +0000 (09:22 +0100)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 16 Apr 2021 04:13:04 +0000 (00:13 -0400)
commit42eb0d54c08a0331d6d295420f602237968d792b
treebd62e76216c4a1092a3d966d2a3419a78591b934
parenta38fd8748464831584a19438cbb3082b5a2dab15
fs: split receive_fd_replace from __receive_fd

receive_fd_replace shares almost no code with the general case, so split
it out.  Also remove the "Bump the sock usage counts" comment from
both copies, as that is now what __receive_sock actually does.

[AV: ... and make the only user of receive_fd_replace() choose between
it and receive_fd() according to what userland had passed to it in
flags]

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/file.c
include/linux/file.h
kernel/seccomp.c