Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359721
b: refs/heads/master
c: 13cc8a7
h: refs/heads/master
i:
  359719: 2f96847
v: v3
  • Loading branch information
Jeff Layton authored and J. Bruce Fields committed Feb 4, 2013
1 parent dffe272 commit aeaa224
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0338dd157282c19696d3c32614a748d0ba814b12
refs/heads/master: 13cc8a78e89db0469e67ac9b3ae466b661af93fa
10 changes: 3 additions & 7 deletions trunk/fs/nfsd/nfscache.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

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;
static unsigned int max_drc_entries;
Expand Down Expand Up @@ -113,7 +112,6 @@ int nfsd_reply_cache_init(void)
INIT_LIST_HEAD(&lru_head);
max_drc_entries = nfsd_cache_size_limit();
num_drc_entries = 0;
cache_disabled = 0;
return 0;
out_nomem:
printk(KERN_ERR "nfsd: failed to allocate reply cache\n");
Expand All @@ -130,8 +128,6 @@ void nfsd_reply_cache_shutdown(void)
nfsd_reply_cache_free_locked(rp);
}

cache_disabled = 1;

kfree (cache_hash);
cache_hash = NULL;

Expand Down Expand Up @@ -215,7 +211,7 @@ nfsd_cache_lookup(struct svc_rqst *rqstp)
int rtn;

rqstp->rq_cacherep = NULL;
if (cache_disabled || type == RC_NOCACHE) {
if (type == RC_NOCACHE) {
nfsdstats.rcnocache++;
return RC_DOIT;
}
Expand Down Expand Up @@ -345,11 +341,11 @@ nfsd_cache_lookup(struct svc_rqst *rqstp)
void
nfsd_cache_update(struct svc_rqst *rqstp, int cachetype, __be32 *statp)
{
struct svc_cacherep *rp;
struct svc_cacherep *rp = rqstp->rq_cacherep;
struct kvec *resv = &rqstp->rq_res.head[0], *cachv;
int len;

if (!(rp = rqstp->rq_cacherep) || cache_disabled)
if (!rp)
return;

len = resv->iov_len - ((char*)statp - (char*)resv->iov_base);
Expand Down

0 comments on commit aeaa224

Please sign in to comment.