summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_subr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r--sys/kern/vfs_subr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 7cb1ac4..dfa5a68 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -815,13 +815,15 @@ getnewvnode(tag, mp, vops, vpp)
/*
* Wait for available vnodes.
*/
- while (numvnodes > desiredvnodes) {
+ if (numvnodes > desiredvnodes) {
if (vnlruproc_sig == 0) {
vnlruproc_sig = 1; /* avoid unnecessary wakeups */
wakeup(vnlruproc);
}
msleep(&vnlruproc_sig, &vnode_free_list_mtx, PVFS,
"vlruwk", hz);
+ if (numvnodes > desiredvnodes)
+ return (ENFILE);
}
numvnodes++;
mtx_unlock(&vnode_free_list_mtx);
OpenPOWER on IntegriCloud