diff options
| author | Eric W. Biederman <ebiederm@xmission.com> | 2020-11-21 02:14:28 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-06-21 15:52:48 +0300 |
| commit | 32ac87287d0b50eb7d6933e58580fc78198f1f35 (patch) | |
| tree | bb434997de3c34dcc0753601667cc11ea8efaf49 /include/linux/fdtable.h | |
| parent | c4716bb296504cbc64aeefb370df44e821214c44 (diff) | |
| download | linux-32ac87287d0b50eb7d6933e58580fc78198f1f35.tar.xz | |
file: Implement task_lookup_fd_rcu
[ Upstream commit 3a879fb38082125cc0d8aa89b70c7f3a7cdf584b ]
As a companion to lookup_fd_rcu implement task_lookup_fd_rcu for
querying an arbitrary process about a specific file.
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
v1: https://lkml.kernel.org/r/20200818103713.aw46m7vprsy4vlve@wittgenstein
Link: https://lkml.kernel.org/r/20201120231441.29911-11-ebiederm@xmission.com
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux/fdtable.h')
| -rw-r--r-- | include/linux/fdtable.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/fdtable.h b/include/linux/fdtable.h index 695306cc5337..a88f68f74067 100644 --- a/include/linux/fdtable.h +++ b/include/linux/fdtable.h @@ -110,6 +110,8 @@ static inline struct file *lookup_fd_rcu(unsigned int fd) return files_lookup_fd_rcu(current->files, fd); } +struct file *task_lookup_fd_rcu(struct task_struct *task, unsigned int fd); + struct task_struct; struct files_struct *get_files_struct(struct task_struct *); |
