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

Properly decrement refcount on failure in nfsd4_probe_callback.

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/nfs4callback.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -puN fs/nfsd/nfs4callback.c~nfsd4-cbnull-refcount-leak fs/nfsd/nfs4callback.c
--- 25/fs/nfsd/nfs4callback.c~nfsd4-cbnull-refcount-leak	2005-03-07 23:55:16.000000000 -0800
+++ 25-akpm/fs/nfsd/nfs4callback.c	2005-03-07 23:55:16.000000000 -0800
@@ -434,7 +434,6 @@ nfsd4_probe_callback(struct nfs4_client 
 	clnt->cl_intr = 1;
 	clnt->cl_softrtry = 1;
 	clnt->cl_chatty = 1;
-	cb->cb_client = clnt;
 
 	/* Kick rpciod, put the call on the wire. */
 
@@ -444,6 +443,7 @@ nfsd4_probe_callback(struct nfs4_client 
 	}
 
 	/* the task holds a reference to the nfs4_client struct */
+	cb->cb_client = clnt;
 	atomic_inc(&clp->cl_count);
 
 	msg.rpc_cred = nfsd4_lookupcred(clp,0);
@@ -456,6 +456,7 @@ nfsd4_probe_callback(struct nfs4_client 
 	return;
 
 out_rpciod:
+	atomic_dec(&clp->cl_count);
 	rpciod_down();
 out_clnt:
 	rpc_shutdown_client(clnt);
_