author: Eric W. Biederman <ebiederm@xmission.com> 2020-11-20 17:14:26 -0600
committer: Eric W. Biederman <ebiederm@xmission.com> 2020-12-10 12:40:03 -0600
commit: f36c2943274199cb8aef32ac96531ffb7c4b43d0
parent: 120ce2b0cd52abe73e8b16c23461eb14df5a87d8
Commit Summary:
Diffstat:
1 file changed, 2 insertions, 2 deletions
diff --git a/fs/file.c b/fs/file.c
index 9d0e91168be1..5861c4f89419 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -814,7 +814,7 @@ static struct file *__fget_files(struct files_struct *files, unsigned int fd,
rcu_read_lock();
loop:
- file = fcheck_files(files, fd);
+ file = files_lookup_fd_rcu(files, fd);
if (file) {
/* File object ref couldn't be taken.
* dup2() atomicity guarantee is the reason
@@ -1127,7 +1127,7 @@ SYSCALL_DEFINE2(dup2, unsigned int, oldfd, unsigned int, newfd)
int retval = oldfd;
rcu_read_lock();
- if (!fcheck_files(files, oldfd))
+ if (!files_lookup_fd_rcu(files, oldfd))
retval = -EBADF;
rcu_read_unlock();
return retval;