Date: Fri, 15 Jun 2012 21:45:25 +0000 (UTC) From: Rick Macklem <rmacklem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r237146 - projects/nfsv4.1-client/sys/rpc Message-ID: <201206152145.q5FLjP0s005301@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rmacklem Date: Fri Jun 15 21:45:24 2012 New Revision: 237146 URL: http://svn.freebsd.org/changeset/base/237146 Log: Fix a refence count problem for the backchannel SVCXPRT structure. Modified: projects/nfsv4.1-client/sys/rpc/clnt_rc.c projects/nfsv4.1-client/sys/rpc/svc_vc.c Modified: projects/nfsv4.1-client/sys/rpc/clnt_rc.c ============================================================================== --- projects/nfsv4.1-client/sys/rpc/clnt_rc.c Fri Jun 15 20:27:15 2012 (r237145) +++ projects/nfsv4.1-client/sys/rpc/clnt_rc.c Fri Jun 15 21:45:24 2012 (r237146) @@ -367,6 +367,7 @@ static bool_t clnt_reconnect_control(CLIENT *cl, u_int request, void *info) { struct rc_data *rc = (struct rc_data *)cl->cl_private; + SVCXPRT *xprt; if (info == NULL) { return (FALSE); @@ -449,6 +450,10 @@ clnt_reconnect_control(CLIENT *cl, u_int break; case CLSET_BACKCHANNEL: +printf("clntrc reg backch\n"); + xprt = (SVCXPRT *)info; + SVC_ACQUIRE(xprt); + xprt_register(xprt); rc->rc_backchannel = info; break; @@ -488,9 +493,16 @@ static void clnt_reconnect_destroy(CLIENT *cl) { struct rc_data *rc = (struct rc_data *)cl->cl_private; + SVCXPRT *xprt; if (rc->rc_client) CLNT_DESTROY(rc->rc_client); + if (rc->rc_backchannel) { +printf("clntrc dereg backch\n"); + xprt = (SVCXPRT *)rc->rc_backchannel; + xprt_unregister(xprt); + SVC_RELEASE(xprt); + } crfree(rc->rc_ucred); mtx_destroy(&rc->rc_lock); mem_free(rc, sizeof(*rc)); Modified: projects/nfsv4.1-client/sys/rpc/svc_vc.c ============================================================================== --- projects/nfsv4.1-client/sys/rpc/svc_vc.c Fri Jun 15 20:27:15 2012 (r237145) +++ projects/nfsv4.1-client/sys/rpc/svc_vc.c Fri Jun 15 21:45:24 2012 (r237146) @@ -294,9 +294,6 @@ svc_vc_create_backchannel(SVCPOOL *pool) xprt->xp_p1 = cd; xprt->xp_p2 = NULL; xprt->xp_ops = &svc_vc_backchannel_ops; - - xprt_register(xprt); - return (xprt); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206152145.q5FLjP0s005301>