@@ -193,6 +193,9 @@ nfs41_callback_up(struct svc_serv *serv, struct rpc_xprt *xprt)
serv->bc_xprt = bc_xprt;
xprt->bc_serv = serv;
+ /* socket is shared with the fore channel */
+ set_bit(XPT_SHARE_SOCK, &bc_xprt->xpt_flags);
+
INIT_LIST_HEAD(&serv->sv_cb_list);
spin_lock_init(&serv->sv_cb_lock);
init_waitqueue_head(&serv->sv_cb_waitq);
@@ -62,6 +62,7 @@ struct svc_xprt {
#define XPT_DETACHED 10 /* detached from tempsocks list */
#define XPT_LISTENER 11 /* listening endpoint */
#define XPT_CACHE_AUTH 12 /* cache auth info */
+#define XPT_SHARE_SOCK 13 /* fore and back channel share socket */
struct svc_pool *xpt_pool; /* current pool iff queued */
struct svc_serv *xpt_server; /* service for transport */
@@ -128,7 +128,8 @@ static void svc_xprt_free(struct kref *kref)
if (test_bit(XPT_CACHE_AUTH, &xprt->xpt_flags))
svcauth_unix_info_release(xprt);
put_net(xprt->xpt_net);
- xprt->xpt_ops->xpo_free(xprt);
+ if (!test_bit(XPT_SHARE_SOCK, &xprt->xpt_flags))
+ xprt->xpt_ops->xpo_free(xprt);
module_put(owner);
}