diff options
| author | Jeff Roberson <jeff@FreeBSD.org> | 2005-04-04 11:43:44 +0000 |
|---|---|---|
| committer | Jeff Roberson <jeff@FreeBSD.org> | 2005-04-04 11:43:44 +0000 |
| commit | 92b8231d4fc5c9de27c4e69bee4917401174a0a7 (patch) | |
| tree | 80406a844d763701ccc2cdf130614602bc459c37 | |
| parent | b308de8beb50d84fd7fcfea2897f8d5aa3dc9961 (diff) | |
Notes
| -rw-r--r-- | sys/kern/vfs_subr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 7cb1ac4a2070..dfa5a689c1eb 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); |
