aboutsummaryrefslogtreecommitdiff
path: root/Documentation/filesystems/files.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/filesystems/files.txt')
-rw-r--r--Documentation/filesystems/files.txt12
1 files changed, 6 insertions, 6 deletions
diff --git a/Documentation/filesystems/files.txt b/Documentation/filesystems/files.txt
index 8c206f4e025..46dfc6b038c 100644
--- a/Documentation/filesystems/files.txt
+++ b/Documentation/filesystems/files.txt
@@ -55,7 +55,7 @@ the fdtable structure -
2. Reading of the fdtable as described above must be protected
by rcu_read_lock()/rcu_read_unlock().
-3. For any update to the the fd table, files->file_lock must
+3. For any update to the fd table, files->file_lock must
be held.
4. To look up the file structure given an fd, a reader
@@ -76,13 +76,13 @@ the fdtable structure -
5. Handling of the file structures is special. Since the look-up
of the fd (fget()/fget_light()) are lock-free, it is possible
that look-up may race with the last put() operation on the
- file structure. This is avoided using the rcuref APIs
+ file structure. This is avoided using atomic_long_inc_not_zero()
on ->f_count :
rcu_read_lock();
file = fcheck_files(files, fd);
if (file) {
- if (rcuref_inc_lf(&file->f_count))
+ if (atomic_long_inc_not_zero(&file->f_count))
*fput_needed = 1;
else
/* Didn't get the reference, someone's freed */
@@ -92,7 +92,7 @@ the fdtable structure -
....
return file;
- rcuref_inc_lf() detects if refcounts is already zero or
+ atomic_long_inc_not_zero() detects if refcounts is already zero or
goes to zero during increment. If it does, we fail
fget()/fget_light().
@@ -113,8 +113,8 @@ the fdtable structure -
if (fd >= 0) {
/* locate_fd() may have expanded fdtable, load the ptr */
fdt = files_fdtable(files);
- FD_SET(fd, fdt->open_fds);
- FD_CLR(fd, fdt->close_on_exec);
+ __set_open_fd(fd, fdt);
+ __clear_close_on_exec(fd, fdt);
spin_unlock(&files->file_lock);
.....