Re: [PATCH 17/17] file: Rename __close_fd to close_fd and remove the files parameter

Christian Brauner
2020-08-18T10:19:35Z

On Mon, Aug 17, 2020 at 05:04:25PM -0500, Eric W. Biederman wrote:
> The function __close_fd was added to support binder[1]. Now that
> binder has been fixed to no longer need __close_fd[2] and
> get_files_struct has been removed it is no longer possible to
> correctly call __close_fd with anything current->files pass as it's
> files parameter.
>
> Therefore transform the files parameter into a local variable
> initialized to current->files, and rename __close_fd to close_fd to
> reflect this change, and keep it in sync with the similar changes to
> __alloc_fd, and __fd_install.
>
> This removes the need for callers to care about the extra care that
> needs to be take if anything except current->files is passed, by
> limiting the callers to only operation on current->files.
>
> [1] 483ce1d4b8c3 ("take descriptor-related part of close() to file.c")
> [2] 44d8047f1d87 ("binder: use standard functions to allocate fds")
> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
> ---

Acked-by: Christian Brauner <christian.brauner@ubuntu.com>