nfs41: sunrpc: add a struct svc_xprt pointer to struct svc_serv for backchannel use
authorAndy Adamson <andros@netapp.com>
Wed, 1 Apr 2009 13:23:10 +0000 (09:23 -0400)
committerBenny Halevy <bhalevy@panasas.com>
Wed, 17 Jun 2009 21:11:31 +0000 (14:11 -0700)
This svc_xprt is passed on to the callback service thread to be later used
to processes incoming svc_rqst's

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
include/linux/sunrpc/svc.h
net/sunrpc/svc.c

index 16043c4a8bf45f9050855341d6d6d99925cddb2b..ea8009695c69b1ea437b255fd0a141ebf21feaa7 100644 (file)
@@ -103,6 +103,7 @@ struct svc_serv {
        spinlock_t              sv_cb_lock;     /* protects the svc_cb_list */
        wait_queue_head_t       sv_cb_waitq;    /* sleep here if there are no
                                                 * entries in the svc_cb_list */
+       struct svc_xprt         *bc_xprt;
 #endif /* CONFIG_NFS_V4_1 */
 };
 
index 06b52e465f470a81fcf2d1015506a626e683af6f..b35048fabe22e0976d269f33c03f2d56d0fdd37d 100644 (file)
@@ -487,6 +487,10 @@ svc_destroy(struct svc_serv *serv)
        if (svc_serv_is_pooled(serv))
                svc_pool_map_put();
 
+#if defined(CONFIG_NFS_V4_1)
+       svc_sock_destroy(serv->bc_xprt);
+#endif /* CONFIG_NFS_V4_1 */
+
        svc_unregister(serv);
        kfree(serv->sv_pools);
        kfree(serv);