diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfsd/nfsctl.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index 80e97a5ffc3f..36e8e135d5a6 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c | |||
@@ -454,12 +454,15 @@ static ssize_t write_ports(struct file *file, char *buf, size_t size) | |||
454 | err = nfsd_create_serv(); | 454 | err = nfsd_create_serv(); |
455 | if (!err) { | 455 | if (!err) { |
456 | int proto = 0; | 456 | int proto = 0; |
457 | err = svc_addsock(nfsd_serv, fd, buf, &proto); | 457 | err = lockd_up(proto); |
458 | if (!err) { | ||
459 | err = svc_addsock(nfsd_serv, fd, buf, &proto); | ||
460 | if (err) | ||
461 | lockd_down(); | ||
462 | } | ||
458 | /* Decrease the count, but don't shutdown the | 463 | /* Decrease the count, but don't shutdown the |
459 | * the service | 464 | * the service |
460 | */ | 465 | */ |
461 | if (err >= 0) | ||
462 | lockd_up(proto); | ||
463 | nfsd_serv->sv_nrthreads--; | 466 | nfsd_serv->sv_nrthreads--; |
464 | } | 467 | } |
465 | return err; | 468 | return err; |