aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfsctl.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index 508941c23af7..af7469efc61c 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -950,14 +950,18 @@ static ssize_t __write_ports_addfd(char *buf)
950 return err; 950 return err;
951 951
952 err = lockd_up(); 952 err = lockd_up();
953 if (err != 0) 953 if (err != 0) {
954 goto out; 954 svc_destroy(nfsd_serv);
955 return err;
956 }
955 957
956 err = svc_addsock(nfsd_serv, fd, buf, SIMPLE_TRANSACTION_LIMIT); 958 err = svc_addsock(nfsd_serv, fd, buf, SIMPLE_TRANSACTION_LIMIT);
957 if (err < 0) 959 if (err < 0) {
958 lockd_down(); 960 lockd_down();
961 svc_destroy(nfsd_serv);
962 return err;
963 }
959 964
960out:
961 /* Decrease the count, but don't shut down the service */ 965 /* Decrease the count, but don't shut down the service */
962 nfsd_serv->sv_nrthreads--; 966 nfsd_serv->sv_nrthreads--;
963 return err; 967 return err;