diff options
Diffstat (limited to 'fs/lockd/svc.c')
-rw-r--r-- | fs/lockd/svc.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index 448768b52913..3cc369e5693f 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c | |||
@@ -254,15 +254,11 @@ lockd_up(int proto) /* Maybe add a 'family' option when IPv6 is supported ?? */ | |||
254 | 254 | ||
255 | mutex_lock(&nlmsvc_mutex); | 255 | mutex_lock(&nlmsvc_mutex); |
256 | /* | 256 | /* |
257 | * Unconditionally increment the user count ... this is | ||
258 | * the number of clients who _want_ a lockd process. | ||
259 | */ | ||
260 | nlmsvc_users++; | ||
261 | /* | ||
262 | * Check whether we're already up and running. | 257 | * Check whether we're already up and running. |
263 | */ | 258 | */ |
264 | if (nlmsvc_pid) { | 259 | if (nlmsvc_pid) { |
265 | error = make_socks(nlmsvc_serv, proto); | 260 | if (proto) |
261 | error = make_socks(nlmsvc_serv, proto); | ||
266 | goto out; | 262 | goto out; |
267 | } | 263 | } |
268 | 264 | ||
@@ -270,7 +266,7 @@ lockd_up(int proto) /* Maybe add a 'family' option when IPv6 is supported ?? */ | |||
270 | * Sanity check: if there's no pid, | 266 | * Sanity check: if there's no pid, |
271 | * we should be the first user ... | 267 | * we should be the first user ... |
272 | */ | 268 | */ |
273 | if (nlmsvc_users > 1) | 269 | if (nlmsvc_users) |
274 | printk(KERN_WARNING | 270 | printk(KERN_WARNING |
275 | "lockd_up: no pid, %d users??\n", nlmsvc_users); | 271 | "lockd_up: no pid, %d users??\n", nlmsvc_users); |
276 | 272 | ||
@@ -302,6 +298,8 @@ lockd_up(int proto) /* Maybe add a 'family' option when IPv6 is supported ?? */ | |||
302 | destroy_and_out: | 298 | destroy_and_out: |
303 | svc_destroy(serv); | 299 | svc_destroy(serv); |
304 | out: | 300 | out: |
301 | if (!error) | ||
302 | nlmsvc_users++; | ||
305 | mutex_unlock(&nlmsvc_mutex); | 303 | mutex_unlock(&nlmsvc_mutex); |
306 | return error; | 304 | return error; |
307 | } | 305 | } |