[pnfs] [PATCH 08/10] nfs41: Implement NFSv4.1 callback service process.
Benny Halevy
bhalevy at panasas.com
Thu Jan 3 09:03:48 EST 2008
On Jan. 03, 2008, 2:01 +0200, Ricardo Labiaga <ricardo.labiaga at netapp.com> wrote:
<snip>
> +static void nfs41_callback_svc(struct svc_rqst *rqstp)
> +{
> + struct svc_serv *serv = rqstp->rq_server;
> + struct list_head *entry;
> + struct rpc_rqst *req;
> +
DEFINE_WAIT below is defining a wait_queue_t variable on the stack
so the empty line should be avoided.
> + DEFINE_WAIT(wq);
> +
<snip>
> +int nfs41_callback_up(struct svc_serv *serv, struct rpc_xprt *xprt)
> +{
> + int ret;
> +
> + xprt->serv = serv;
> + ret = xprt_setup_backchannel(xprt, NFS41_BC_MIN_CALLBACKS);
> + if (ret < 0)
> + return ret;
> +
> + INIT_LIST_HEAD(&serv->sv_cb_list);
> + spin_lock_init(&serv->sv_cb_lock);
> + init_waitqueue_head(&serv->sv_cb_waitq);
> + ret = svc_create_thread(nfs41_callback_svc, serv);
> +
> + return ret;
again, you can do this in one return statement, no need to
assign to ret.
> +}
> +#endif /* CONFIG_NFS_V4_1 */
More information about the pNFS
mailing list