Skip to content

Commit

Permalink
LockD: move global usage counter manipulation from error path
Browse files Browse the repository at this point in the history
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
  • Loading branch information
Stanislav Kinsbursky authored and J. Bruce Fields committed Jun 1, 2012
1 parent 2445223 commit 7d13ec7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions fs/lockd/svc.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ static struct svc_serv *lockd_create_svc(void)
int lockd_up(struct net *net)
{
struct svc_serv *serv;
int error = 0;
int error;

mutex_lock(&nlmsvc_mutex);

Expand Down Expand Up @@ -370,14 +370,13 @@ int lockd_up(struct net *net)
goto err_start;
}

nlmsvc_users++;
/*
* Note: svc_serv structures have an initial use count of 1,
* so we exit through here on both success and failure.
*/
err_net:
svc_destroy(serv);
if (!error)
nlmsvc_users++;
err_create:
mutex_unlock(&nlmsvc_mutex);
return error;
Expand Down

0 comments on commit 7d13ec7

Please sign in to comment.