Commit 7372cfb8 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] nfsd4: remove stateowner debug counters

Get rid of these debug counters.  Since they're no longer necessarily
incremented under state lock, we'd need to convert them to atomic_t to
guarantee them correct.  It doesn't seem worth it.

Also, the debug checks in kmem_cache_destroy() should be sufficient for at
least one of the purposes the debugging counters existed for--we'll get a
dump_stack() if there are still stateowners left when we shut down.
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: default avatarNeil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 2cc9438b
......@@ -72,11 +72,8 @@ u32 add_perclient = 0;
u32 del_perclient = 0;
u32 alloc_file = 0;
u32 free_file = 0;
u32 alloc_sowner = 0;
u32 free_sowner = 0;
u32 vfsopen = 0;
u32 vfsclose = 0;
u32 alloc_lsowner= 0;
u32 alloc_delegation= 0;
u32 free_delegation= 0;
......@@ -1017,7 +1014,6 @@ nfs4_free_stateowner(struct kref *kref)
container_of(kref, struct nfs4_stateowner, so_ref);
kfree(sop->so_owner.data);
kmem_cache_free(stateowner_slab, sop);
free_sowner++;
}
static inline struct nfs4_stateowner *
......@@ -1066,7 +1062,6 @@ alloc_init_open_stateowner(unsigned int strhashval, struct nfs4_client *clp, str
rp->rp_status = NFSERR_SERVERFAULT;
rp->rp_buflen = 0;
rp->rp_buf = rp->rp_ibuf;
alloc_sowner++;
return sop;
}
......@@ -2589,7 +2584,6 @@ alloc_init_lock_stateowner(unsigned int strhashval, struct nfs4_client *clp, str
rp->rp_status = NFSERR_SERVERFAULT;
rp->rp_buflen = 0;
rp->rp_buf = rp->rp_ibuf;
alloc_lsowner++;
return sop;
}
......@@ -3274,8 +3268,6 @@ __nfs4_state_shutdown(void)
add_perclient, del_perclient);
dprintk("NFSD: alloc_file %d free_file %d\n",
alloc_file, free_file);
dprintk("NFSD: alloc_sowner %d alloc_lsowner %d free_sowner %d\n",
alloc_sowner, alloc_lsowner, free_sowner);
dprintk("NFSD: vfsopen %d vfsclose %d\n",
vfsopen, vfsclose);
dprintk("NFSD: alloc_delegation %d free_delegation %d\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment