Commit d0025268 authored by Trond Myklebust's avatar Trond Myklebust Committed by Anna Schumaker

SUNRPC: Initialise struct svc_serv backchannel fields during __svc_create()

Clean up.
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent f4b52bb0
...@@ -147,9 +147,6 @@ nfs41_callback_up(struct svc_serv *serv) ...@@ -147,9 +147,6 @@ nfs41_callback_up(struct svc_serv *serv)
{ {
struct svc_rqst *rqstp; struct svc_rqst *rqstp;
INIT_LIST_HEAD(&serv->sv_cb_list);
spin_lock_init(&serv->sv_cb_lock);
init_waitqueue_head(&serv->sv_cb_waitq);
rqstp = svc_prepare_thread(serv, &serv->sv_pools[0], NUMA_NO_NODE); rqstp = svc_prepare_thread(serv, &serv->sv_pools[0], NUMA_NO_NODE);
dprintk("--> %s return %d\n", __func__, PTR_ERR_OR_ZERO(rqstp)); dprintk("--> %s return %d\n", __func__, PTR_ERR_OR_ZERO(rqstp));
return rqstp; return rqstp;
......
...@@ -401,6 +401,21 @@ int svc_bind(struct svc_serv *serv, struct net *net) ...@@ -401,6 +401,21 @@ int svc_bind(struct svc_serv *serv, struct net *net)
} }
EXPORT_SYMBOL_GPL(svc_bind); EXPORT_SYMBOL_GPL(svc_bind);
#if defined(CONFIG_SUNRPC_BACKCHANNEL)
static void
__svc_init_bc(struct svc_serv *serv)
{
INIT_LIST_HEAD(&serv->sv_cb_list);
spin_lock_init(&serv->sv_cb_lock);
init_waitqueue_head(&serv->sv_cb_waitq);
}
#else
static void
__svc_init_bc(struct svc_serv *serv)
{
}
#endif
/* /*
* Create an RPC service * Create an RPC service
*/ */
...@@ -443,6 +458,8 @@ __svc_create(struct svc_program *prog, unsigned int bufsize, int npools, ...@@ -443,6 +458,8 @@ __svc_create(struct svc_program *prog, unsigned int bufsize, int npools,
init_timer(&serv->sv_temptimer); init_timer(&serv->sv_temptimer);
spin_lock_init(&serv->sv_lock); spin_lock_init(&serv->sv_lock);
__svc_init_bc(serv);
serv->sv_nrpools = npools; serv->sv_nrpools = npools;
serv->sv_pools = serv->sv_pools =
kcalloc(serv->sv_nrpools, sizeof(struct svc_pool), kcalloc(serv->sv_nrpools, sizeof(struct svc_pool),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment