diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-12-12 15:24:32 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-12-12 15:24:32 -0800 |
commit | c9111b4df407e6b73f2a92c36f7fc93a7b27fd99 (patch) | |
tree | 1a5445e1efa58ac914ada74be50ee8ad9593b69f /fs | |
parent | 2208f6513accb06ccb0f7b6f9e97989cd865585a (diff) | |
parent | 781c2a5a5f75eacc04663aced0f0f1a648d4f308 (diff) |
Merge branch 'for-3.13' of git://linux-nfs.org/~bfields/linux
Pull nfsd reply cache bugfix from Bruce Fields:
"One bugfix for nfsd crashes"
* 'for-3.13' of git://linux-nfs.org/~bfields/linux:
nfsd: when reusing an existing repcache entry, unhash it first
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfsd/nfscache.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/nfsd/nfscache.c b/fs/nfsd/nfscache.c index 9186c7ce0b14..b6af150c96b8 100644 --- a/fs/nfsd/nfscache.c +++ b/fs/nfsd/nfscache.c @@ -132,6 +132,13 @@ nfsd_reply_cache_alloc(void) } static void +nfsd_reply_cache_unhash(struct svc_cacherep *rp) +{ + hlist_del_init(&rp->c_hash); + list_del_init(&rp->c_lru); +} + +static void nfsd_reply_cache_free_locked(struct svc_cacherep *rp) { if (rp->c_type == RC_REPLBUFF && rp->c_replvec.iov_base) { @@ -417,7 +424,7 @@ nfsd_cache_lookup(struct svc_rqst *rqstp) rp = list_first_entry(&lru_head, struct svc_cacherep, c_lru); if (nfsd_cache_entry_expired(rp) || num_drc_entries >= max_drc_entries) { - lru_put_end(rp); + nfsd_reply_cache_unhash(rp); prune_cache_entries(); goto search_cache; } |