diff options
Diffstat (limited to 'sys/nfsclient/nfs_bio.c')
-rw-r--r-- | sys/nfsclient/nfs_bio.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/sys/nfsclient/nfs_bio.c b/sys/nfsclient/nfs_bio.c index 3905118..1b607dc 100644 --- a/sys/nfsclient/nfs_bio.c +++ b/sys/nfsclient/nfs_bio.c @@ -1143,7 +1143,7 @@ again: /* * Find a free iod to process this request. */ - for (iod = 0; iod < NFS_MAXASYNCDAEMON; iod++) + for (iod = 0; iod < nfs_numasync; iod++) if (nfs_iodwant[iod]) { gotiod = TRUE; break; @@ -1158,6 +1158,19 @@ again: gotiod = TRUE; } + if (gotiod) { + /* + * Found one, so wake it up and tell it which + * mount to process. + */ + NFS_DPF(ASYNCIO, ("nfs_asyncio: waking iod %d for mount %p\n", + iod, nmp)); + nfs_iodwant[iod] = (struct proc *)0; + nfs_iodmount[iod] = nmp; + nmp->nm_bufqiods++; + wakeup((caddr_t)&nfs_iodwant[iod]); + } + /* * If none are free, we may already have an iod working on this mount * point. If so, it will process our request. @@ -1177,17 +1190,6 @@ again: */ if (gotiod) { /* - * Found one, so wake it up and tell it which - * mount to process. - */ - NFS_DPF(ASYNCIO, ("nfs_asyncio: waking iod %d for mount %p\n", - iod, nmp)); - nfs_iodwant[iod] = (struct proc *)0; - nfs_iodmount[iod] = nmp; - nmp->nm_bufqiods++; - wakeup((caddr_t)&nfs_iodwant[iod]); - - /* * Ensure that the queue never grows too large. We still want * to asynchronize so we block rather then return EIO. */ |