View | Details | Raw Unified | Return to bug 255695 | Differences between
and this patch

Collapse All | Expand All

(-)sys/fs/nfsserver/nfs_nfsdstate.c (-6 / +6 lines)
Lines 721-728 nfsrv_getclient(nfsquad_t clientid, int opflags, struc Link Here
721
				    cbprogram, NFSV4_CBVERS);
721
				    cbprogram, NFSV4_CBVERS);
722
			    if (clp->lc_req.nr_client != NULL) {
722
			    if (clp->lc_req.nr_client != NULL) {
723
				SVC_ACQUIRE(nd->nd_xprt);
723
				SVC_ACQUIRE(nd->nd_xprt);
724
				nd->nd_xprt->xp_p2 =
724
				CLNT_ACQUIRE(clp->lc_req.nr_client);
725
				    clp->lc_req.nr_client->cl_private;
725
				nd->nd_xprt->xp_p2 = clp->lc_req.nr_client;
726
				/* Disable idle timeout. */
726
				/* Disable idle timeout. */
727
				nd->nd_xprt->xp_idletimeout = 0;
727
				nd->nd_xprt->xp_idletimeout = 0;
728
				nsep->sess_cbsess.nfsess_xprt = nd->nd_xprt;
728
				nsep->sess_cbsess.nfsess_xprt = nd->nd_xprt;
Lines 6229-6236 nfsrv_checksequence(struct nfsrv_descript *nd, uint32_ Link Here
6229
		    "nfsrv_checksequence: implicit back channel bind\n");
6229
		    "nfsrv_checksequence: implicit back channel bind\n");
6230
		savxprt = sep->sess_cbsess.nfsess_xprt;
6230
		savxprt = sep->sess_cbsess.nfsess_xprt;
6231
		SVC_ACQUIRE(nd->nd_xprt);
6231
		SVC_ACQUIRE(nd->nd_xprt);
6232
		nd->nd_xprt->xp_p2 =
6232
		CLNT_ACQUIRE(sep->sess_clp->lc_req.nr_client);
6233
		    sep->sess_clp->lc_req.nr_client->cl_private;
6233
		nd->nd_xprt->xp_p2 = sep->sess_clp->lc_req.nr_client;
6234
		nd->nd_xprt->xp_idletimeout = 0;	/* Disable timeout. */
6234
		nd->nd_xprt->xp_idletimeout = 0;	/* Disable timeout. */
6235
		sep->sess_cbsess.nfsess_xprt = nd->nd_xprt;
6235
		sep->sess_cbsess.nfsess_xprt = nd->nd_xprt;
6236
	}
6236
	}
Lines 6434-6441 nfsrv_bindconnsess(struct nfsrv_descript *nd, uint8_t Link Here
6434
				    "backchannel\n");
6434
				    "backchannel\n");
6435
				savxprt = sep->sess_cbsess.nfsess_xprt;
6435
				savxprt = sep->sess_cbsess.nfsess_xprt;
6436
				SVC_ACQUIRE(nd->nd_xprt);
6436
				SVC_ACQUIRE(nd->nd_xprt);
6437
				nd->nd_xprt->xp_p2 =
6437
				CLNT_ACQUIRE(clp->lc_req.nr_client);
6438
				    clp->lc_req.nr_client->cl_private;
6438
				nd->nd_xprt->xp_p2 = clp->lc_req.nr_client;
6439
				/* Disable idle timeout. */
6439
				/* Disable idle timeout. */
6440
				nd->nd_xprt->xp_idletimeout = 0;
6440
				nd->nd_xprt->xp_idletimeout = 0;
6441
				sep->sess_cbsess.nfsess_xprt = nd->nd_xprt;
6441
				sep->sess_cbsess.nfsess_xprt = nd->nd_xprt;
(-)sys/rpc/svc_vc.c (+4 lines)
Lines 474-479 static void Link Here
474
svc_vc_destroy(SVCXPRT *xprt)
474
svc_vc_destroy(SVCXPRT *xprt)
475
{
475
{
476
	struct cf_conn *cd = (struct cf_conn *)xprt->xp_p1;
476
	struct cf_conn *cd = (struct cf_conn *)xprt->xp_p1;
477
	CLIENT *cl = (CLIENT *)xprt->xp_p2;
477
478
478
	SOCKBUF_LOCK(&xprt->xp_socket->so_rcv);
479
	SOCKBUF_LOCK(&xprt->xp_socket->so_rcv);
479
	if (xprt->xp_upcallset) {
480
	if (xprt->xp_upcallset) {
Lines 481-486 svc_vc_destroy(SVCXPRT *xprt) Link Here
481
		soupcall_clear(xprt->xp_socket, SO_RCV);
482
		soupcall_clear(xprt->xp_socket, SO_RCV);
482
	}
483
	}
483
	SOCKBUF_UNLOCK(&xprt->xp_socket->so_rcv);
484
	SOCKBUF_UNLOCK(&xprt->xp_socket->so_rcv);
485
486
	if (cl != NULL)
487
		CLNT_RELEASE(cl);
484
488
485
	svc_vc_destroy_common(xprt);
489
	svc_vc_destroy_common(xprt);
486
490
(-)sys/rpc/clnt_bck.c (-1 / +12 lines)
Lines 546-560 clnt_bck_destroy(CLIENT *cl) Link Here
546
/*
546
/*
547
 * This call is done by the svc code when a backchannel RPC reply is
547
 * This call is done by the svc code when a backchannel RPC reply is
548
 * received.
548
 * received.
549
 * For the server end, where callback RPCs to the client are performed,
550
 * xp_p2 points to the "CLIENT" and not the associated "struct ct_data"
551
 * so that svc_vc_destroy() can CLNT_RELEASE() the reference count on it.
549
 */
552
 */
550
void
553
void
551
clnt_bck_svccall(void *arg, struct mbuf *mrep, uint32_t xid)
554
clnt_bck_svccall(void *arg, struct mbuf *mrep, uint32_t xid)
552
{
555
{
553
	struct ct_data *ct = (struct ct_data *)arg;
556
	CLIENT *cl = (CLIENT *)arg;
557
	struct ct_data *ct;
554
	struct ct_request *cr;
558
	struct ct_request *cr;
555
	int foundreq;
559
	int foundreq;
556
560
561
	ct = (struct ct_data *)cl->cl_private;
557
	mtx_lock(&ct->ct_lock);
562
	mtx_lock(&ct->ct_lock);
563
	if (ct->ct_closing || ct->ct_closed) {
564
		mtx_unlock(&ct->ct_lock);
565
		m_freem(mrep);
566
		return;
567
	}
568
558
	ct->ct_upcallrefs++;
569
	ct->ct_upcallrefs++;
559
	/*
570
	/*
560
	 * See if we can match this reply to a request.
571
	 * See if we can match this reply to a request.

Return to bug 255695