Lines Matching refs:sn

167 	struct sunrpc_net *sn = net_generic(net, sunrpc_net_id);  in rpcb_get_local()  local
169 spin_lock(&sn->rpcb_clnt_lock); in rpcb_get_local()
170 if (sn->rpcb_users) in rpcb_get_local()
171 sn->rpcb_users++; in rpcb_get_local()
172 cnt = sn->rpcb_users; in rpcb_get_local()
173 spin_unlock(&sn->rpcb_clnt_lock); in rpcb_get_local()
180 struct sunrpc_net *sn = net_generic(net, sunrpc_net_id); in rpcb_put_local() local
181 struct rpc_clnt *clnt = sn->rpcb_local_clnt; in rpcb_put_local()
182 struct rpc_clnt *clnt4 = sn->rpcb_local_clnt4; in rpcb_put_local()
185 spin_lock(&sn->rpcb_clnt_lock); in rpcb_put_local()
186 if (sn->rpcb_users) { in rpcb_put_local()
187 if (--sn->rpcb_users == 0) { in rpcb_put_local()
188 sn->rpcb_local_clnt = NULL; in rpcb_put_local()
189 sn->rpcb_local_clnt4 = NULL; in rpcb_put_local()
191 shutdown = !sn->rpcb_users; in rpcb_put_local()
193 spin_unlock(&sn->rpcb_clnt_lock); in rpcb_put_local()
210 struct sunrpc_net *sn = net_generic(net, sunrpc_net_id); in rpcb_set_local() local
213 sn->rpcb_local_clnt = clnt; in rpcb_set_local()
214 sn->rpcb_local_clnt4 = clnt4; in rpcb_set_local()
215 sn->rpcb_is_af_local = is_af_local ? 1 : 0; in rpcb_set_local()
217 sn->rpcb_users = 1; in rpcb_set_local()
403 static int rpcb_register_call(struct sunrpc_net *sn, struct rpc_clnt *clnt, struct rpc_message *msg… in rpcb_register_call() argument
408 if (is_set || !sn->rpcb_is_af_local) in rpcb_register_call()
465 struct sunrpc_net *sn = net_generic(net, sunrpc_net_id); in rpcb_register() local
476 return rpcb_register_call(sn, sn->rpcb_local_clnt, &msg, is_set); in rpcb_register()
482 static int rpcb_register_inet4(struct sunrpc_net *sn, in rpcb_register_inet4() argument
500 result = rpcb_register_call(sn, sn->rpcb_local_clnt4, msg, is_set); in rpcb_register_inet4()
508 static int rpcb_register_inet6(struct sunrpc_net *sn, in rpcb_register_inet6() argument
526 result = rpcb_register_call(sn, sn->rpcb_local_clnt4, msg, is_set); in rpcb_register_inet6()
531 static int rpcb_unregister_all_protofamilies(struct sunrpc_net *sn, in rpcb_unregister_all_protofamilies() argument
541 return rpcb_register_call(sn, sn->rpcb_local_clnt4, msg, false); in rpcb_unregister_all_protofamilies()
600 struct sunrpc_net *sn = net_generic(net, sunrpc_net_id); in rpcb_v4_register() local
602 if (sn->rpcb_local_clnt4 == NULL) in rpcb_v4_register()
606 return rpcb_unregister_all_protofamilies(sn, &msg); in rpcb_v4_register()
612 return rpcb_register_inet4(sn, address, &msg); in rpcb_v4_register()
614 return rpcb_register_inet6(sn, address, &msg); in rpcb_v4_register()