Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359719
b: refs/heads/master
c: 0ee0bf7
h: refs/heads/master
i:
  359717: a6660a1
  359715: 43a7b66
  359711: c66a324
v: v3
  • Loading branch information
Jeff Layton authored and J. Bruce Fields committed Feb 4, 2013
1 parent 8d9ea83 commit 2f96847
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 56c2548b2d24de440868885e4c36c985eca2d083
refs/heads/master: 0ee0bf7ee5b55f232b645c4af0b0c37d4e115a32
4 changes: 4 additions & 0 deletions trunk/fs/nfsd/nfscache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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);
}

Expand All @@ -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--;
}
Expand Down

0 comments on commit 2f96847

Please sign in to comment.