diff options
-rw-r--r-- | fs/nfsd/filecache.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c index fb9b1656a287..909b5bc72bd3 100644 --- a/fs/nfsd/filecache.c +++ b/fs/nfsd/filecache.c @@ -370,22 +370,8 @@ nfsd_file_put(struct nfsd_file *nf) if (refcount_dec_not_one(&nf->nf_ref)) return; - /* Try to add it to the LRU. If that fails, decrement. */ - if (nfsd_file_lru_add(nf)) { - /* If it's still hashed, we're done */ - if (test_bit(NFSD_FILE_HASHED, &nf->nf_flags)) { - nfsd_file_schedule_laundrette(); - return; - } - - /* - * We're racing with unhashing, so try to remove it from - * the LRU. If removal fails, then someone else already - * has our reference. - */ - if (!nfsd_file_lru_remove(nf)) - return; - } + if (nfsd_file_lru_add(nf)) + return; } if (refcount_dec_and_test(&nf->nf_ref)) nfsd_file_free(nf); |