From: Matthew Dillon Date: Fri, 15 May 2009 07:54:50 +0000 (-0700) Subject: Fix a simple code bug when dealing with a raced vnode in hammer_get_vnode(). X-Git-Tag: v2.3.2~267 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/ee23ac7ddab85b277a9e2f24d41c09fac2b0496c Fix a simple code bug when dealing with a raced vnode in hammer_get_vnode(). Reported-by: Francois Tigeot --- diff --git a/sys/vfs/hammer/hammer_inode.c b/sys/vfs/hammer/hammer_inode.c index 7069c4be25..a123dffdf1 100644 --- a/sys/vfs/hammer/hammer_inode.c +++ b/sys/vfs/hammer/hammer_inode.c @@ -251,6 +251,7 @@ hammer_get_vnode(struct hammer_inode *ip, struct vnode **vpp) hammer_lock_ex(&ip->lock); if (ip->vp != NULL) { hammer_unlock(&ip->lock); + vp = *vpp; vp->v_type = VBAD; vx_put(vp); continue;