Commit 1ac83629 authored by Jeff Layton's avatar Jeff Layton Committed by J. Bruce Fields

nfsd: fix comments on nfsd_cache_lookup

Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent d94af6de
...@@ -302,8 +302,10 @@ nfsd_cache_search(struct svc_rqst *rqstp, __wsum csum) ...@@ -302,8 +302,10 @@ nfsd_cache_search(struct svc_rqst *rqstp, __wsum csum)
/* /*
* Try to find an entry matching the current call in the cache. When none * Try to find an entry matching the current call in the cache. When none
* is found, we grab the oldest unlocked entry off the LRU list. * is found, we try to grab the oldest expired entry off the LRU list. If
* Note that no operation within the loop may sleep. * a suitable one isn't there, then drop the cache_lock and allocate a
* new one, then search again in case one got inserted while this thread
* didn't hold the lock.
*/ */
int int
nfsd_cache_lookup(struct svc_rqst *rqstp) nfsd_cache_lookup(struct svc_rqst *rqstp)
...@@ -344,6 +346,7 @@ nfsd_cache_lookup(struct svc_rqst *rqstp) ...@@ -344,6 +346,7 @@ nfsd_cache_lookup(struct svc_rqst *rqstp)
} }
} }
/* Drop the lock and allocate a new entry */
spin_unlock(&cache_lock); spin_unlock(&cache_lock);
rp = nfsd_reply_cache_alloc(); rp = nfsd_reply_cache_alloc();
if (!rp) { if (!rp) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment