nfsd: add some comments to nfsd_file_do_acquire
[ Upstream commit b680cb9b737331aad271feebbedafb865504e234 ] David Howells mentioned that he found this bit of code confusing, so sprinkle in some comments to clarify. Reported-by: David Howells <dhowells@redhat.com> Signed-off-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
ccc3df7195
commit
f8d546333b
1 changed files with 5 additions and 0 deletions
|
@ -1093,6 +1093,11 @@ retry:
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
|
|
||||||
if (nf) {
|
if (nf) {
|
||||||
|
/*
|
||||||
|
* If the nf is on the LRU then it holds an extra reference
|
||||||
|
* that must be put if it's removed. It had better not be
|
||||||
|
* the last one however, since we should hold another.
|
||||||
|
*/
|
||||||
if (nfsd_file_lru_remove(nf))
|
if (nfsd_file_lru_remove(nf))
|
||||||
WARN_ON_ONCE(refcount_dec_and_test(&nf->nf_ref));
|
WARN_ON_ONCE(refcount_dec_and_test(&nf->nf_ref));
|
||||||
goto wait_for_construction;
|
goto wait_for_construction;
|
||||||
|
|
Loading…
Add table
Reference in a new issue