Lines Matching refs:serv

189 static int create_lockd_listener(struct svc_serv *serv, const char *name,  in create_lockd_listener()  argument
195 xprt = svc_find_xprt(serv, name, net, family, 0); in create_lockd_listener()
197 return svc_create_xprt(serv, name, net, family, port, in create_lockd_listener()
203 static int create_lockd_family(struct svc_serv *serv, struct net *net, in create_lockd_family() argument
208 err = create_lockd_listener(serv, "udp", net, family, nlm_udpport); in create_lockd_family()
212 return create_lockd_listener(serv, "tcp", net, family, nlm_tcpport); in create_lockd_family()
225 static int make_socks(struct svc_serv *serv, struct net *net) in make_socks() argument
230 err = create_lockd_family(serv, net, PF_INET); in make_socks()
234 err = create_lockd_family(serv, net, PF_INET6); in make_socks()
245 svc_shutdown_net(serv, net); in make_socks()
249 static int lockd_up_net(struct svc_serv *serv, struct net *net) in lockd_up_net() argument
257 error = svc_bind(serv, net); in lockd_up_net()
261 error = make_socks(serv, net); in lockd_up_net()
273 static void lockd_down_net(struct svc_serv *serv, struct net *net) in lockd_down_net() argument
282 svc_shutdown_net(serv, net); in lockd_down_net()
370 static int lockd_start_svc(struct svc_serv *serv) in lockd_start_svc() argument
380 nlmsvc_rqst = svc_prepare_thread(serv, &serv->sv_pools[0], NUMA_NO_NODE); in lockd_start_svc()
391 svc_sock_update_bufs(serv); in lockd_start_svc()
392 serv->sv_maxconn = nlm_max_connections; in lockd_start_svc()
394 nlmsvc_task = kthread_create(lockd, nlmsvc_rqst, "%s", serv->sv_name); in lockd_start_svc()
422 struct svc_serv *serv; in lockd_create_svc() local
448 serv = svc_create(&nlmsvc_program, LOCKD_BUFSIZE, &lockd_sv_ops); in lockd_create_svc()
449 if (!serv) { in lockd_create_svc()
458 return serv; in lockd_create_svc()
466 struct svc_serv *serv; in lockd_up() local
471 serv = lockd_create_svc(); in lockd_up()
472 if (IS_ERR(serv)) { in lockd_up()
473 error = PTR_ERR(serv); in lockd_up()
477 error = lockd_up_net(serv, net); in lockd_up()
483 error = lockd_start_svc(serv); in lockd_up()
485 lockd_down_net(serv, net); in lockd_up()
494 svc_destroy(serv); in lockd_up()