Commit 7d13ec76 authored by Stanislav Kinsbursky's avatar Stanislav Kinsbursky Committed by J. Bruce Fields

LockD: move global usage counter manipulation from error path

Signed-off-by: default avatarStanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 24452239
...@@ -329,7 +329,7 @@ static struct svc_serv *lockd_create_svc(void) ...@@ -329,7 +329,7 @@ static struct svc_serv *lockd_create_svc(void)
int lockd_up(struct net *net) int lockd_up(struct net *net)
{ {
struct svc_serv *serv; struct svc_serv *serv;
int error = 0; int error;
mutex_lock(&nlmsvc_mutex); mutex_lock(&nlmsvc_mutex);
...@@ -370,14 +370,13 @@ int lockd_up(struct net *net) ...@@ -370,14 +370,13 @@ int lockd_up(struct net *net)
goto err_start; goto err_start;
} }
nlmsvc_users++;
/* /*
* Note: svc_serv structures have an initial use count of 1, * Note: svc_serv structures have an initial use count of 1,
* so we exit through here on both success and failure. * so we exit through here on both success and failure.
*/ */
err_net: err_net:
svc_destroy(serv); svc_destroy(serv);
if (!error)
nlmsvc_users++;
err_create: err_create:
mutex_unlock(&nlmsvc_mutex); mutex_unlock(&nlmsvc_mutex);
return error; return error;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment