From: NeilBrown <neilb@cse.unsw.edu.au>

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: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/fs/nfsd/nfs4state.c |    8 --------
 1 files changed, 8 deletions(-)

diff -puN fs/nfsd/nfs4state.c~nfsd4-remove-stateowner-debug-counters fs/nfsd/nfs4state.c
--- 25/fs/nfsd/nfs4state.c~nfsd4-remove-stateowner-debug-counters	2005-03-07 23:55:14.000000000 -0800
+++ 25-akpm/fs/nfsd/nfs4state.c	2005-03-07 23:55:14.000000000 -0800
@@ -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 
 	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 
 	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",
_