Fix a simple code bug when dealing with a raced vnode in hammer_get_vnode().
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 15 May 2009 07:54:50 +0000 (00:54 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 15 May 2009 07:54:50 +0000 (00:54 -0700)
Reported-by: Francois Tigeot <ftigeot@wolfpond.org>
sys/vfs/hammer/hammer_inode.c

index 7069c4b..a123dff 100644 (file)
@@ -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;