summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2006-05-04 07:42:52 +0000
committerScott Long <scottl@FreeBSD.org>2006-05-04 07:42:52 +0000
commit4bbd19e5d8884a2f3b9809e98c590b8d575c1134 (patch)
tree6cf1a835873e86c0c87a3bdc743f8897f418cba3
parentd5a2c3f47f388a60c42efd6d696b57b851613864 (diff)
downloadsrc-test2-4bbd19e5d8884a2f3b9809e98c590b8d575c1134.tar.gz
src-test2-4bbd19e5d8884a2f3b9809e98c590b8d575c1134.zip
MFC rev 1.669. This is done only because the change has been tested for a
month, and then only because it has been heavily reviewed and recommended. Approved by: re
Notes
Notes: svn path=/releng/6.1/; revision=158286
-rw-r--r--sys/kern/vfs_subr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 5b85adcf6e58..d2de18aeb734 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -646,6 +646,7 @@ static void
vnlru_free(int count)
{
struct vnode *vp;
+ int vfslocked;
mtx_assert(&vnode_free_list_mtx, MA_OWNED);
for (; count > 0; count--) {
@@ -673,7 +674,9 @@ vnlru_free(int count)
vholdl(vp);
mtx_unlock(&vnode_free_list_mtx);
VI_UNLOCK(vp);
+ vfslocked = VFS_LOCK_GIANT(vp->v_mount);
vtryrecycle(vp);
+ VFS_UNLOCK_GIANT(vfslocked);
/*
* If the recycled succeeded this vdrop will actually free
* the vnode. If not it will simply place it back on