Skip to content

Commit fd659fd

Browse files
Eric DumazetAl Viro
authored andcommitted
fix f_count description in Documentation/filesystems/files.txt
Documentation/filesystems/files.txt was not updated when f_count became an atomic_long_t. atomic_long_inc_not_zero() is now used instead of atomic_inc_not_zero() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 1239f26 commit fd659fd

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎Documentation/filesystems/files.txt‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ the fdtable structure -
7676
5. Handling of the file structures is special. Since the look-up
7777
of the fd (fget()/fget_light()) are lock-free, it is possible
7878
that look-up may race with the last put() operation on the
79-
file structure. This is avoided using atomic_inc_not_zero()
79+
file structure. This is avoided using atomic_long_inc_not_zero()
8080
on ->f_count :
8181

8282
rcu_read_lock();
8383
file = fcheck_files(files, fd);
8484
if (file) {
85-
if (atomic_inc_not_zero(&file->f_count))
85+
if (atomic_long_inc_not_zero(&file->f_count))
8686
*fput_needed = 1;
8787
else
8888
/* Didn't get the reference, someone's freed */
@@ -92,7 +92,7 @@ the fdtable structure -
9292
....
9393
return file;
9494

95-
atomic_inc_not_zero() detects if refcounts is already zero or
95+
atomic_long_inc_not_zero() detects if refcounts is already zero or
9696
goes to zero during increment. If it does, we fail
9797
fget()/fget_light().
9898

0 commit comments

Comments
 (0)