diff options
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; |