• Home
  • Raw
  • Download

Lines Matching refs:sn

166 	struct sunrpc_net *sn = net_generic(net, sunrpc_net_id);  in rpcb_get_local()  local
168 spin_lock(&sn->rpcb_clnt_lock); in rpcb_get_local()
169 if (sn->rpcb_users) in rpcb_get_local()
170 sn->rpcb_users++; in rpcb_get_local()
171 cnt = sn->rpcb_users; in rpcb_get_local()
172 spin_unlock(&sn->rpcb_clnt_lock); in rpcb_get_local()
179 struct sunrpc_net *sn = net_generic(net, sunrpc_net_id); in rpcb_put_local() local
180 struct rpc_clnt *clnt = sn->rpcb_local_clnt; in rpcb_put_local()
181 struct rpc_clnt *clnt4 = sn->rpcb_local_clnt4; in rpcb_put_local()
184 spin_lock(&sn->rpcb_clnt_lock); in rpcb_put_local()
185 if (sn->rpcb_users) { in rpcb_put_local()
186 if (--sn->rpcb_users == 0) { in rpcb_put_local()
187 sn->rpcb_local_clnt = NULL; in rpcb_put_local()
188 sn->rpcb_local_clnt4 = NULL; in rpcb_put_local()
190 shutdown = !sn->rpcb_users; in rpcb_put_local()
192 spin_unlock(&sn->rpcb_clnt_lock); in rpcb_put_local()
209 struct sunrpc_net *sn = net_generic(net, sunrpc_net_id); in rpcb_set_local() local
212 sn->rpcb_local_clnt = clnt; in rpcb_set_local()
213 sn->rpcb_local_clnt4 = clnt4; in rpcb_set_local()
214 sn->rpcb_is_af_local = is_af_local ? 1 : 0; in rpcb_set_local()
216 sn->rpcb_users = 1; in rpcb_set_local()
380 static int rpcb_register_call(struct sunrpc_net *sn, struct rpc_clnt *clnt, struct rpc_message *msg… in rpcb_register_call() argument
385 if (is_set || !sn->rpcb_is_af_local) in rpcb_register_call()
442 struct sunrpc_net *sn = net_generic(net, sunrpc_net_id); in rpcb_register() local
453 return rpcb_register_call(sn, sn->rpcb_local_clnt, &msg, is_set); in rpcb_register()
459 static int rpcb_register_inet4(struct sunrpc_net *sn, in rpcb_register_inet4() argument
477 result = rpcb_register_call(sn, sn->rpcb_local_clnt4, msg, is_set); in rpcb_register_inet4()
485 static int rpcb_register_inet6(struct sunrpc_net *sn, in rpcb_register_inet6() argument
503 result = rpcb_register_call(sn, sn->rpcb_local_clnt4, msg, is_set); in rpcb_register_inet6()
508 static int rpcb_unregister_all_protofamilies(struct sunrpc_net *sn, in rpcb_unregister_all_protofamilies() argument
518 return rpcb_register_call(sn, sn->rpcb_local_clnt4, msg, false); in rpcb_unregister_all_protofamilies()
577 struct sunrpc_net *sn = net_generic(net, sunrpc_net_id); in rpcb_v4_register() local
579 if (sn->rpcb_local_clnt4 == NULL) in rpcb_v4_register()
583 return rpcb_unregister_all_protofamilies(sn, &msg); in rpcb_v4_register()
589 return rpcb_register_inet4(sn, address, &msg); in rpcb_v4_register()
591 return rpcb_register_inet6(sn, address, &msg); in rpcb_v4_register()