diff mbox

[PATCH_V3,7/7] NFS only set bc_xprt upon success

Message ID 1292271585-3038-8-git-send-email-andros@netapp.com
State Superseded, archived
Headers show

Commit Message

Andy Adamson Dec. 13, 2010, 8:19 p.m. UTC
None
diff mbox

Patch

diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c
index dc2ead1..8129511 100644
--- a/fs/nfs/callback.c
+++ b/fs/nfs/callback.c
@@ -215,7 +215,6 @@  nfs41_callback_up(struct svc_serv *serv, struct rpc_xprt *xprt)
 	 * Save the svc_serv in the transport so that it can
 	 * be referenced when the session backchannel is initialized
 	 */
-	serv->bc_xprt = bc_xprt;
 	xprt->bc_serv = serv;
 
 	/* socket is shared with the fore channel */
@@ -227,6 +226,8 @@  nfs41_callback_up(struct svc_serv *serv, struct rpc_xprt *xprt)
 	rqstp = svc_prepare_thread(serv, &serv->sv_pools[0]);
 	if (IS_ERR(rqstp))
 		svc_sock_destroy(bc_xprt);
+	else
+		serv->bc_xprt = bc_xprt;
 out:
 	dprintk("--> %s return %p\n", __func__, rqstp);
 	return rqstp;