diff options
author | grog <grog@FreeBSD.org> | 2004-10-06 02:09:59 +0000 |
---|---|---|
committer | grog <grog@FreeBSD.org> | 2004-10-06 02:09:59 +0000 |
commit | 152055d94ba686525c26e82a33494a33654b2f85 (patch) | |
tree | 5b9fe6188b004d9a0280296f1a347025b2ab9f37 | |
parent | 882d69104e8714af21885a5c123811a74609b35b (diff) | |
download | FreeBSD-src-152055d94ba686525c26e82a33494a33654b2f85.zip FreeBSD-src-152055d94ba686525c26e82a33494a33654b2f85.tar.gz |
vtryrecycle: Don't rely on type VBAD alone to mean that we don't need
to clean the vnode. If v_data is set, we still need to
clean it. This code change should catch all incidents of
the previous commit (INVARIANTS only).
-rw-r--r-- | sys/kern/vfs_subr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index d568892..44975d7 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -708,7 +708,7 @@ vtryrecycle(struct vnode *vp) vp->v_iflag &= ~VI_FREE; mtx_unlock(&vnode_free_list_mtx); vp->v_iflag |= VI_DOOMED; - if (vp->v_type != VBAD) { + if ((vp->v_type != VBAD) || (vp->v_data != NULL)) { VOP_UNLOCK(vp, 0, td); vgonel(vp, td); VI_LOCK(vp); |