Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9111b4d authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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
parents 2208f651 781c2a5a
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -131,6 +131,13 @@ nfsd_reply_cache_alloc(void)
	return rp;
}

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)
{
@@ -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;
		}