From 1a053218106c47a9c00bc2a616f1e9ff6c384ee0 Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Sat, 20 Oct 2007 01:47:49 +0200 Subject: [PATCH] --- yaml --- r: 71867 b: refs/heads/master c: 94547426db2f4f2aad2f640ca074ccb1c6f7e660 h: refs/heads/master i: 71865: 6a3fb1a3fab7c60963450905e34e996e61e37295 71863: 5841fbae5d58e3296b78e35e3ac750e9611adbdc v: v3 --- [refs] | 2 +- trunk/Documentation/filesystems/files.txt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index c89756376a2f..dba3b1dba4c4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6888c1ecd63a3e5e206048602b3f59b58f4ffd8f +refs/heads/master: 94547426db2f4f2aad2f640ca074ccb1c6f7e660 diff --git a/trunk/Documentation/filesystems/files.txt b/trunk/Documentation/filesystems/files.txt index 133e213ebb72..bb0142f61084 100644 --- a/trunk/Documentation/filesystems/files.txt +++ b/trunk/Documentation/filesystems/files.txt @@ -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_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_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_inc_not_zero() detects if refcounts is already zero or goes to zero during increment. If it does, we fail fget()/fget_light().