aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd
diff options
context:
space:
mode:
Diffstat (limited to 'fs/lockd')
-rw-r--r--fs/lockd/svc.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
index cf3899aec375..64f1c31b5853 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -230,17 +230,23 @@ static int create_lockd_listener(struct svc_serv *serv, char *name,
230static int make_socks(struct svc_serv *serv) 230static int make_socks(struct svc_serv *serv)
231{ 231{
232 static int warned; 232 static int warned;
233 int err = 0; 233 int err;
234 234
235 err = create_lockd_listener(serv, "udp", nlm_udpport); 235 err = create_lockd_listener(serv, "udp", nlm_udpport);
236 if (err >= 0) 236 if (err < 0)
237 err = create_lockd_listener(serv, "tcp", nlm_tcpport); 237 goto out_err;
238 if (err >= 0) { 238
239 warned = 0; 239 err = create_lockd_listener(serv, "tcp", nlm_tcpport);
240 err = 0; 240 if (err < 0)
241 } else if (warned++ == 0) 241 goto out_err;
242
243 warned = 0;
244 return 0;
245
246out_err:
247 if (warned++ == 0)
242 printk(KERN_WARNING 248 printk(KERN_WARNING
243 "lockd_up: makesock failed, error=%d\n", err); 249 "lockd_up: makesock failed, error=%d\n", err);
244 return err; 250 return err;
245} 251}
246 252