From 2f968478a3fd1153e6dd4cf7b3c3143acb085b6a Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Mon, 4 Feb 2013 08:18:01 -0500 Subject: [PATCH] --- yaml --- r: 359719 b: refs/heads/master c: 0ee0bf7ee5b55f232b645c4af0b0c37d4e115a32 h: refs/heads/master i: 359717: a6660a123ae49d96266e94c22db854349f2ab9a7 359715: 43a7b667d0fdb138faa44862fc6b92eb23188341 359711: c66a324517520026b15ce34980639b27618fb677 v: v3 --- [refs] | 2 +- trunk/fs/nfsd/nfscache.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 14a6c923440d..45d6cdd54d45 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 56c2548b2d24de440868885e4c36c985eca2d083 +refs/heads/master: 0ee0bf7ee5b55f232b645c4af0b0c37d4e115a32 diff --git a/trunk/fs/nfsd/nfscache.c b/trunk/fs/nfsd/nfscache.c index 9d80dfa7778e..c0c58471eb45 100644 --- a/trunk/fs/nfsd/nfscache.c +++ b/trunk/fs/nfsd/nfscache.c @@ -27,6 +27,7 @@ static struct hlist_head * cache_hash; static struct list_head lru_head; static int cache_disabled = 1; static struct kmem_cache *drc_slab; +static unsigned int num_drc_entries; /* * Calculate the hash index from an XID. @@ -68,6 +69,7 @@ nfsd_reply_cache_free_locked(struct svc_cacherep *rp) if (rp->c_type == RC_REPLBUFF) kfree(rp->c_replvec.iov_base); list_del(&rp->c_lru); + --num_drc_entries; kmem_cache_free(drc_slab, rp); } @@ -83,10 +85,12 @@ int nfsd_reply_cache_init(void) INIT_LIST_HEAD(&lru_head); i = CACHESIZE; + num_drc_entries = 0; while (i) { rp = nfsd_reply_cache_alloc(); if (!rp) goto out_nomem; + ++num_drc_entries; list_add(&rp->c_lru, &lru_head); i--; }