NLM: Clean up flow of control in make_socks() function
Clean up: Use Bruce's preferred control flow style in make_socks(). Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
This commit is contained in:
parent
d3fe5ea7cf
commit
0dba7c2a9e
1 changed files with 14 additions and 8 deletions
|
@ -230,15 +230,21 @@ static int create_lockd_listener(struct svc_serv *serv, char *name,
|
|||
static int make_socks(struct svc_serv *serv)
|
||||
{
|
||||
static int warned;
|
||||
int err = 0;
|
||||
int err;
|
||||
|
||||
err = create_lockd_listener(serv, "udp", nlm_udpport);
|
||||
if (err >= 0)
|
||||
if (err < 0)
|
||||
goto out_err;
|
||||
|
||||
err = create_lockd_listener(serv, "tcp", nlm_tcpport);
|
||||
if (err >= 0) {
|
||||
if (err < 0)
|
||||
goto out_err;
|
||||
|
||||
warned = 0;
|
||||
err = 0;
|
||||
} else if (warned++ == 0)
|
||||
return 0;
|
||||
|
||||
out_err:
|
||||
if (warned++ == 0)
|
||||
printk(KERN_WARNING
|
||||
"lockd_up: makesock failed, error=%d\n", err);
|
||||
return err;
|
||||
|
|
Loading…
Reference in a new issue