summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirk McKusick <mckusick@FreeBSD.org>2002-10-14 19:54:39 +0000
committerKirk McKusick <mckusick@FreeBSD.org>2002-10-14 19:54:39 +0000
commita6b9f47b31f0bd0d7a2c068b9ab1d8fc08f2d306 (patch)
tree0e7d91ba0d6fc1e8d0e5c4ccd42436c79f8cd94e
parent289e09ee7351368d496a1f84121e568297551579 (diff)
Notes
-rw-r--r--sys/kern/vfs_subr.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 579f08d99a30..101dffdbb16f 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -925,11 +925,10 @@ getnewvnode(tag, mp, vops, vpp)
mtx_unlock(&vnode_free_list_mtx);
error = vcanrecycle(vp, &vnmp);
mtx_lock(&vnode_free_list_mtx);
- if (error != 0)
- TAILQ_INSERT_TAIL(&vnode_free_list, vp,
- v_freelist);
- else
+ if (error == 0)
break;
+ TAILQ_INSERT_TAIL(&vnode_free_list, vp, v_freelist);
+ vp = NULL;
}
}
if (vp) {