diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2020-11-21 02:14:40 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-01-04 13:39:18 +0300 |
commit | 57b20530363d127ab6a82e336275769258eb5f37 (patch) | |
tree | 2e423b8f38b1a984302d2ad2319ae42f6fda38e1 /fs/file.c | |
parent | 214f80e25176eb4d756bc9fe528ef7bf23d2f9a1 (diff) | |
download | linux-57b20530363d127ab6a82e336275769258eb5f37.tar.xz |
file: Rename __close_fd_get_file close_fd_get_file
[ Upstream commit 9fe83c43e71cdb8e5b9520bcb98706a2b3c680c8 ]
The function close_fd_get_file is explicitly a variant of
__close_fd[1]. Now that __close_fd has been renamed close_fd, rename
close_fd_get_file to be consistent with close_fd.
When __alloc_fd, __close_fd and __fd_install were introduced the
double underscore indicated that the function took a struct
files_struct parameter. The function __close_fd_get_file never has so
the naming has always been inconsistent. This just cleans things up
so there are not any lingering mentions or references __close_fd left
in the code.
[1] 80cd795630d6 ("binder: fix use-after-free due to ksys_close() during fdget()")
Link: https://lkml.kernel.org/r/20201120231441.29911-23-ebiederm@xmission.com
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/file.c')
-rw-r--r-- | fs/file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/file.c b/fs/file.c index 8431dfde036c..aacc5bf80bd6 100644 --- a/fs/file.c +++ b/fs/file.c @@ -780,11 +780,11 @@ int __close_range(unsigned fd, unsigned max_fd, unsigned int flags) } /* - * variant of __close_fd that gets a ref on the file for later fput. + * variant of close_fd that gets a ref on the file for later fput. * The caller must ensure that filp_close() called on the file, and then * an fput(). */ -int __close_fd_get_file(unsigned int fd, struct file **res) +int close_fd_get_file(unsigned int fd, struct file **res) { struct files_struct *files = current->files; struct file *file; |