summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanislav Kinsbursky <skinsbursky@parallels.com>2012-04-25 18:23:02 +0400
committerJ. Bruce Fields <bfields@redhat.com>2012-06-01 04:29:43 +0400
commit7d13ec761ae45d5e401965c73d855840ff8cdd23 (patch)
tree687f136f3ebec65f3700aab47f6c82bf48797c9e
parent24452239094a8b52f54fd4403f6e177837cecf67 (diff)
downloadlinux-7d13ec761ae45d5e401965c73d855840ff8cdd23.tar.xz
LockD: move global usage counter manipulation from error path
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
-rw-r--r--fs/lockd/svc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
index ad11ea777581..53cd69ef2add 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -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);
@@ -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;