summaryrefslogtreecommitdiff
path: root/fs/nfs
diff options
context:
space:
mode:
authorBenny Halevy <bhalevy@panasas.com>2009-04-01 09:23:11 -0400
committerBenny Halevy <bhalevy@panasas.com>2009-06-17 14:11:31 -0700
commit8f975242352e92898dc641ebff0d24808f39848a (patch)
tree5a14be85500e5da33b97f4951efa42abe56cd570 /fs/nfs
parent9c9f3f5fa62cc4959e4d4d1cf1ec74f2d6ac1197 (diff)
nfs41: create a svc_xprt for nfs41 callback thread and use for incoming callbacks
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/callback.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c
index 470928898063..37815f3216aa 100644
--- a/fs/nfs/callback.c
+++ b/fs/nfs/callback.c
@@ -185,16 +185,31 @@ nfs41_callback_svc(void *vrqstp)
struct svc_rqst *
nfs41_callback_up(struct svc_serv *serv, struct rpc_xprt *xprt)
{
+ struct svc_xprt *bc_xprt;
+ struct svc_rqst *rqstp = ERR_PTR(-ENOMEM);
+
+ dprintk("--> %s\n", __func__);
+ /* Create a svc_sock for the service */
+ bc_xprt = svc_sock_create(serv, xprt->prot);
+ if (!bc_xprt)
+ goto out;
+
/*
* 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;
INIT_LIST_HEAD(&serv->sv_cb_list);
spin_lock_init(&serv->sv_cb_lock);
init_waitqueue_head(&serv->sv_cb_waitq);
- return svc_prepare_thread(serv, &serv->sv_pools[0]);
+ rqstp = svc_prepare_thread(serv, &serv->sv_pools[0]);
+ if (IS_ERR(rqstp))
+ svc_sock_destroy(bc_xprt);
+out:
+ dprintk("--> %s return %p\n", __func__, rqstp);
+ return rqstp;
}
static inline int nfs_minorversion_callback_svc_setup(u32 minorversion,