summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Roberson <jeff@FreeBSD.org>2002-08-21 06:40:34 +0000
committerJeff Roberson <jeff@FreeBSD.org>2002-08-21 06:40:34 +0000
commit88cf6b94bd91e75cf505f977d12057d46d60cec1 (patch)
tree2802840d4767c550a931dccd4f52d0ae7ecc6fe4
parent71ea4ba57c8473b817189625b25f02e6d3493a08 (diff)
Notes
-rw-r--r--sys/kern/vfs_subr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 75b819b61b59..a00d84ae1c89 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -739,15 +739,16 @@ vcanrecycle(struct vnode *vp)
/* We should be able to immediately acquire this */
/* XXX This looks like it should panic if it fails */
- if (vn_lock(vp, LK_INTERLOCK | LK_EXCLUSIVE, td) != 0)
+ if (vn_lock(vp, LK_INTERLOCK | LK_EXCLUSIVE, td) != 0) {
+ VI_UNLOCK(vp);
return (EWOULDBLOCK);
+ }
/*
* Don't recycle if we still have cached pages.
*/
if (VOP_GETVOBJECT(vp, &object) == 0 &&
(object->resident_page_count ||
object->ref_count)) {
- VOP_UNLOCK(vp, 0, td);
error = EBUSY;
goto done;
}