1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-12 09:58:36 +00:00

- 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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=157470

View File

@ -640,6 +640,7 @@ static void
vnlru_free(int count)
{
struct vnode *vp;
int vfslocked;
mtx_assert(&vnode_free_list_mtx, MA_OWNED);
for (; count > 0; count--) {
@ -667,7 +668,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