diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2020-11-20 17:14:27 -0600 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2020-12-10 12:40:07 -0600 |
commit | 460b4f812a9d473d4b39d87d37844f9fc30a9eb3 (patch) | |
tree | ab069d7f2f83820de3f091de2757a0e86b2af866 /Documentation/filesystems | |
parent | f36c2943274199cb8aef32ac96531ffb7c4b43d0 (diff) | |
download | linux-460b4f812a9d473d4b39d87d37844f9fc30a9eb3.tar.gz linux-460b4f812a9d473d4b39d87d37844f9fc30a9eb3.tar.bz2 linux-460b4f812a9d473d4b39d87d37844f9fc30a9eb3.zip |
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 'Documentation/filesystems')
-rw-r--r-- | Documentation/filesystems/files.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Documentation/filesystems/files.rst b/Documentation/filesystems/files.rst index ea75acdb632c..bcf84459917f 100644 --- a/Documentation/filesystems/files.rst +++ b/Documentation/filesystems/files.rst @@ -62,7 +62,7 @@ the fdtable structure - be held. 4. To look up the file structure given an fd, a reader - must use either fcheck() or files_lookup_fd_rcu() APIs. These + must use either lookup_fd_rcu() or files_lookup_fd_rcu() APIs. These take care of barrier requirements due to lock-free lookup. An example:: @@ -70,7 +70,7 @@ the fdtable structure - struct file *file; rcu_read_lock(); - file = fcheck(fd); + file = lookup_fd_rcu(fd); if (file) { ... } @@ -104,7 +104,7 @@ the fdtable structure - lock-free, they must be installed using rcu_assign_pointer() API. If they are looked up lock-free, rcu_dereference() must be used. However it is advisable to use files_fdtable() - and fcheck()/files_lookup_fd_rcu() which take care of these issues. + and lookup_fd_rcu()/files_lookup_fd_rcu() which take care of these issues. 7. While updating, the fdtable pointer must be looked up while holding files->file_lock. If ->file_lock is dropped, then |