- VFS_LOCK_GIANT when recycling a vnode via getnewvnode. We may be

recycling for an unrelated filesystem.  I really don't like potentially
   acquiring giant in the context of a giantless filesystem but there
   are reasonable objections to removing the recycling from this path.

Sponsored by:	Isilon Systems, Inc.
This commit is contained in:
Jeff Roberson 2006-04-04 06:46:10 +00:00
parent 4b24e4210e
commit b53bf1269c

View File

@ -640,6 +640,7 @@ static void
vnlru_free(int count) vnlru_free(int count)
{ {
struct vnode *vp; struct vnode *vp;
int vfslocked;
mtx_assert(&vnode_free_list_mtx, MA_OWNED); mtx_assert(&vnode_free_list_mtx, MA_OWNED);
for (; count > 0; count--) { for (; count > 0; count--) {
@ -667,7 +668,9 @@ vnlru_free(int count)
vholdl(vp); vholdl(vp);
mtx_unlock(&vnode_free_list_mtx); mtx_unlock(&vnode_free_list_mtx);
VI_UNLOCK(vp); VI_UNLOCK(vp);
vfslocked = VFS_LOCK_GIANT(vp->v_mount);
vtryrecycle(vp); vtryrecycle(vp);
VFS_UNLOCK_GIANT(vfslocked);
/* /*
* If the recycled succeeded this vdrop will actually free * If the recycled succeeded this vdrop will actually free
* the vnode. If not it will simply place it back on * the vnode. If not it will simply place it back on