Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 309830
b: refs/heads/master
c: dbf9b5d
h: refs/heads/master
v: v3
  • Loading branch information
Stanislav Kinsbursky authored and J. Bruce Fields committed Jun 1, 2012
1 parent 67e42e6 commit 6efe60f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4db77695bf5738bdafa83d1b58b64cbecc6f55e7
refs/heads/master: dbf9b5d74ceae787607e3d7db626fffa8be3c03d
23 changes: 7 additions & 16 deletions trunk/fs/lockd/svc.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,9 @@ static int lockd_up_net(struct svc_serv *serv, struct net *net)
if (ln->nlmsvc_users++)
return 0;

error = svc_rpcb_setup(serv, net);
error = svc_bind(serv, net);
if (error)
goto err_rpcb;
goto err_bind;

error = make_socks(serv, net);
if (error < 0)
Expand All @@ -270,7 +270,7 @@ static int lockd_up_net(struct svc_serv *serv, struct net *net)

err_socks:
svc_rpcb_cleanup(serv, net);
err_rpcb:
err_bind:
ln->nlmsvc_users--;
return error;
}
Expand Down Expand Up @@ -298,7 +298,6 @@ int lockd_up(struct net *net)
{
struct svc_serv *serv;
int error = 0;
struct lockd_net *ln = net_generic(net, lockd_net_id);

mutex_lock(&nlmsvc_mutex);
/*
Expand All @@ -324,17 +323,9 @@ int lockd_up(struct net *net)
goto out;
}

error = svc_bind(serv, net);
if (error < 0) {
printk(KERN_WARNING "lockd_up: bind service failed\n");
goto destroy_and_out;
}

ln->nlmsvc_users++;

error = make_socks(serv, net);
error = lockd_up_net(serv, net);
if (error < 0)
goto err_start;
goto err_net;

/*
* Create the kernel thread and wait for it to start.
Expand Down Expand Up @@ -367,7 +358,7 @@ int lockd_up(struct net *net)
* Note: svc_serv structures have an initial use count of 1,
* so we exit through here on both success and failure.
*/
destroy_and_out:
err_net:
svc_destroy(serv);
out:
if (!error)
Expand All @@ -377,7 +368,7 @@ int lockd_up(struct net *net)

err_start:
lockd_down_net(serv, net);
goto destroy_and_out;
goto err_net;
}
EXPORT_SYMBOL_GPL(lockd_up);

Expand Down

0 comments on commit 6efe60f

Please sign in to comment.