MFC r269189:

Initialize zfs vnode v_hash when the vnode is allocated.
This commit is contained in:
kib 2014-08-04 01:12:49 +00:00
parent cec08c7294
commit 00b893a599
2 changed files with 3 additions and 4 deletions

View File

@ -2076,8 +2076,6 @@ zfs_vget(vfs_t *vfsp, ino_t ino, int flags, vnode_t **vpp)
err = vn_lock(*vpp, flags);
if (err != 0)
*vpp = NULL;
else
(*vpp)->v_hash = ino;
return (err);
}

View File

@ -1228,9 +1228,10 @@ again:
vnode_t *vp = ZTOV(zp);
err = insmntque(vp, zfsvfs->z_vfs);
if (err == 0)
if (err == 0) {
vp->v_hash = obj_num;
VOP_UNLOCK(vp, 0);
else {
} else {
zp->z_vnode = NULL;
zfs_znode_dmu_fini(zp);
zfs_znode_free(zp);