summaryrefslogtreecommitdiff
path: root/include/linux/fdtable.h
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2020-11-21 02:14:27 +0300
committerEric W. Biederman <ebiederm@xmission.com>2020-12-10 21:40:07 +0300
commit460b4f812a9d473d4b39d87d37844f9fc30a9eb3 (patch)
treeab069d7f2f83820de3f091de2757a0e86b2af866 /include/linux/fdtable.h
parentf36c2943274199cb8aef32ac96531ffb7c4b43d0 (diff)
downloadlinux-460b4f812a9d473d4b39d87d37844f9fc30a9eb3.tar.xz
file: Rename fcheck lookup_fd_rcu
Also remove the confusing comment about checking if a fd exists. I could not find one instance in the entire kernel that still matches the description or the reason for the name fcheck. The need for better names became apparent in the last round of discussion of this set of changes[1]. [1] https://lkml.kernel.org/r/CAHk-=wj8BQbgJFLa+J0e=iT-1qpmCRTbPAJ8gd6MJQ=kbRPqyQ@mail.gmail.com Link: https://lkml.kernel.org/r/20201120231441.29911-10-ebiederm@xmission.com Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'include/linux/fdtable.h')
-rw-r--r--include/linux/fdtable.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/fdtable.h b/include/linux/fdtable.h
index fa8c402a7790..2a4a8fed536e 100644
--- a/include/linux/fdtable.h
+++ b/include/linux/fdtable.h
@@ -105,10 +105,10 @@ static inline struct file *files_lookup_fd_rcu(struct files_struct *files, unsig
return files_lookup_fd_raw(files, fd);
}
-/*
- * Check whether the specified fd has an open file.
- */
-#define fcheck(fd) files_lookup_fd_rcu(current->files, fd)
+static inline struct file *lookup_fd_rcu(unsigned int fd)
+{
+ return files_lookup_fd_rcu(current->files, fd);
+}
struct task_struct;