summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Greenman <dg@FreeBSD.org>1995-03-10 21:18:24 +0000
committerDavid Greenman <dg@FreeBSD.org>1995-03-10 21:18:24 +0000
commitf8a0b2dd88efff6f1393874650c2ac458e816122 (patch)
tree64f7cb3b19e8afc530d385dd9024a8e77793569e
parent914e6eb70dd0591aa0046397f4bdce5430d5f57e (diff)
Notes
-rw-r--r--sys/kern/vfs_export.c6
-rw-r--r--sys/kern/vfs_subr.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c
index 96bea161f2bd..808a9f129abe 100644
--- a/sys/kern/vfs_export.c
+++ b/sys/kern/vfs_export.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_subr.c 8.13 (Berkeley) 4/18/94
- * $Id: vfs_subr.c,v 1.19 1995/03/07 18:59:45 davidg Exp $
+ * $Id: vfs_subr.c,v 1.20 1995/03/09 20:27:04 phk Exp $
*/
/*
@@ -338,9 +338,9 @@ getnewvnode(tag, mp, vops, vpp)
* 3. if less that 1/16th of our vnodes are free.
* We don't want to trash the namei cache either.
*/
- if (vp == NULL ||
+ if (freevnodes < (numvnodes >> 4) ||
numvnodes < desiredvnodes ||
- freevnodes < (numvnodes >> 4)) {
+ vp == NULL) {
vp = (struct vnode *) malloc((u_long) sizeof *vp,
M_VNODE, M_WAITOK);
bzero((char *) vp, sizeof *vp);
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 96bea161f2bd..808a9f129abe 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_subr.c 8.13 (Berkeley) 4/18/94
- * $Id: vfs_subr.c,v 1.19 1995/03/07 18:59:45 davidg Exp $
+ * $Id: vfs_subr.c,v 1.20 1995/03/09 20:27:04 phk Exp $
*/
/*
@@ -338,9 +338,9 @@ getnewvnode(tag, mp, vops, vpp)
* 3. if less that 1/16th of our vnodes are free.
* We don't want to trash the namei cache either.
*/
- if (vp == NULL ||
+ if (freevnodes < (numvnodes >> 4) ||
numvnodes < desiredvnodes ||
- freevnodes < (numvnodes >> 4)) {
+ vp == NULL) {
vp = (struct vnode *) malloc((u_long) sizeof *vp,
M_VNODE, M_WAITOK);
bzero((char *) vp, sizeof *vp);