summaryrefslogtreecommitdiff
path: root/sys/nfsclient/nfs_nfsiod.c
diff options
context:
space:
mode:
authorPeter Edwards <peadar@FreeBSD.org>2004-04-11 13:30:20 +0000
committerPeter Edwards <peadar@FreeBSD.org>2004-04-11 13:30:20 +0000
commit1630ff08a33f9840d35fcb5bf3a44003b37d64c2 (patch)
treea9fbdaa4c8e4800e0faf70c2b2c9b5b19300ad03 /sys/nfsclient/nfs_nfsiod.c
parent55fda92f91a3cde46d7376fa3f0eed310f71ab46 (diff)
Notes
Diffstat (limited to 'sys/nfsclient/nfs_nfsiod.c')
-rw-r--r--sys/nfsclient/nfs_nfsiod.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/nfsclient/nfs_nfsiod.c b/sys/nfsclient/nfs_nfsiod.c
index f36d19fcdf0f..bf6175ac6d27 100644
--- a/sys/nfsclient/nfs_nfsiod.c
+++ b/sys/nfsclient/nfs_nfsiod.c
@@ -87,7 +87,7 @@ static unsigned int nfs_iodmaxidle = 120;
SYSCTL_UINT(_vfs_nfs, OID_AUTO, iodmaxidle, CTLFLAG_RW, &nfs_iodmaxidle, 0, "");
/* Maximum number of nfsiod kthreads */
-static unsigned int nfs_iodmax = 20;
+unsigned int nfs_iodmax = 20;
/* Minimum number of nfsiod kthreads to keep as spares */
static unsigned int nfs_iodmin = 4;
@@ -280,7 +280,9 @@ finish:
nmp->nm_bufqiods--;
nfs_iodwant[myiod] = NULL;
nfs_iodmount[myiod] = NULL;
- nfs_numasync--;
+ /* Someone may be waiting for the last nfsiod to terminate. */
+ if (--nfs_numasync == 0)
+ wakeup(&nfs_numasync);
if ((error == 0) || (error == EWOULDBLOCK))
kthread_exit(0);
/* Abnormal termination */