diff options
author | Christian Brauner <brauner@kernel.org> | 2023-11-30 15:49:11 +0300 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2023-12-12 16:24:14 +0300 |
commit | 4e94ddfe2aab72139acb8d5372fac9e6c3f3e383 (patch) | |
tree | b9fa0a662e33ebe85ea86e239f823bf1c204906e /include | |
parent | eac9189c96196574a83a553ca5a7543dd9f5fe3e (diff) | |
download | linux-4e94ddfe2aab72139acb8d5372fac9e6c3f3e383.tar.xz |
file: remove __receive_fd()
Honestly, there's little value in having a helper with and without that
int __user *ufd argument. It's just messy and doesn't really give us
anything. Just expose receive_fd() with that argument and get rid of
that helper.
Link: https://lore.kernel.org/r/20231130-vfs-files-fixes-v1-5-e73ca6f4ea83@kernel.org
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/file.h | 5 | ||||
-rw-r--r-- | include/net/scm.h | 2 |
2 files changed, 2 insertions, 5 deletions
diff --git a/include/linux/file.h b/include/linux/file.h index c0d5219c2852..6834a29338c4 100644 --- a/include/linux/file.h +++ b/include/linux/file.h @@ -96,10 +96,7 @@ DEFINE_CLASS(get_unused_fd, int, if (_T >= 0) put_unused_fd(_T), extern void fd_install(unsigned int fd, struct file *file); -extern int __receive_fd(struct file *file, int __user *ufd, - unsigned int o_flags); - -extern int receive_fd(struct file *file, unsigned int o_flags); +int receive_fd(struct file *file, int __user *ufd, unsigned int o_flags); int receive_fd_replace(int new_fd, struct file *file, unsigned int o_flags); diff --git a/include/net/scm.h b/include/net/scm.h index 8aae2468bae0..cf68acec4d70 100644 --- a/include/net/scm.h +++ b/include/net/scm.h @@ -214,7 +214,7 @@ static inline int scm_recv_one_fd(struct file *f, int __user *ufd, { if (!ufd) return -EFAULT; - return __receive_fd(f, ufd, flags); + return receive_fd(f, ufd, flags); } #endif /* __LINUX_NET_SCM_H */ |