diff options
author | Tom Tucker <tom@opengridcomputing.com> | 2007-12-30 22:07:44 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2008-02-01 16:42:09 -0500 |
commit | d7c9f1ed972b4a468dd24a2457721704dfe9ca70 (patch) | |
tree | 40cd2b38db79df4d90753b58789c3e4bc274095f /fs/lockd | |
parent | b700cbb11fced2a0e953fdd19eac07ffaad86598 (diff) |
svc: Change services to use new svc_create_xprt service
Modify the various kernel RPC svcs to use the svc_create_xprt service.
Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
Acked-by: Neil Brown <neilb@suse.de>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Greg Banks <gnb@sgi.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/lockd')
-rw-r--r-- | fs/lockd/svc.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index 82e2192a0d5c..868691535115 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c | |||
@@ -219,13 +219,12 @@ lockd(struct svc_rqst *rqstp) | |||
219 | module_put_and_exit(0); | 219 | module_put_and_exit(0); |
220 | } | 220 | } |
221 | 221 | ||
222 | 222 | static int find_xprt(struct svc_serv *serv, char *proto) | |
223 | static int find_socket(struct svc_serv *serv, int proto) | ||
224 | { | 223 | { |
225 | struct svc_sock *svsk; | 224 | struct svc_sock *svsk; |
226 | int found = 0; | 225 | int found = 0; |
227 | list_for_each_entry(svsk, &serv->sv_permsocks, sk_list) | 226 | list_for_each_entry(svsk, &serv->sv_permsocks, sk_list) |
228 | if (svsk->sk_sk->sk_protocol == proto) { | 227 | if (strcmp(svsk->sk_xprt.xpt_class->xcl_name, proto) == 0) { |
229 | found = 1; | 228 | found = 1; |
230 | break; | 229 | break; |
231 | } | 230 | } |
@@ -243,13 +242,13 @@ static int make_socks(struct svc_serv *serv, int proto) | |||
243 | int err = 0; | 242 | int err = 0; |
244 | 243 | ||
245 | if (proto == IPPROTO_UDP || nlm_udpport) | 244 | if (proto == IPPROTO_UDP || nlm_udpport) |
246 | if (!find_socket(serv, IPPROTO_UDP)) | 245 | if (!find_xprt(serv, "udp")) |
247 | err = svc_makesock(serv, IPPROTO_UDP, nlm_udpport, | 246 | err = svc_create_xprt(serv, "udp", nlm_udpport, |
248 | SVC_SOCK_DEFAULTS); | 247 | SVC_SOCK_DEFAULTS); |
249 | if (err >= 0 && (proto == IPPROTO_TCP || nlm_tcpport)) | 248 | if (err >= 0 && (proto == IPPROTO_TCP || nlm_tcpport)) |
250 | if (!find_socket(serv, IPPROTO_TCP)) | 249 | if (!find_xprt(serv, "tcp")) |
251 | err = svc_makesock(serv, IPPROTO_TCP, nlm_tcpport, | 250 | err = svc_create_xprt(serv, "tcp", nlm_tcpport, |
252 | SVC_SOCK_DEFAULTS); | 251 | SVC_SOCK_DEFAULTS); |
253 | 252 | ||
254 | if (err >= 0) { | 253 | if (err >= 0) { |
255 | warned = 0; | 254 | warned = 0; |