svn commit: r269496 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

Konstantin Belousov kib at FreeBSD.org
Mon Aug 4 01:16:09 UTC 2014


Author: kib
Date: Mon Aug  4 01:16:08 2014
New Revision: 269496
URL: http://svnweb.freebsd.org/changeset/base/269496

Log:
  MFC r269189:
  Initialize zfs vnode v_hash when the vnode is allocated.

Modified:
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
==============================================================================
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c	Mon Aug  4 01:14:27 2014	(r269495)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c	Mon Aug  4 01:16:08 2014	(r269496)
@@ -2077,8 +2077,6 @@ zfs_vget(vfs_t *vfsp, ino_t ino, int fla
 		err = vn_lock(*vpp, flags);
 	if (err != 0)
 		*vpp = NULL;
-	else
-		(*vpp)->v_hash = ino;
 	return (err);
 }
 

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
==============================================================================
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c	Mon Aug  4 01:14:27 2014	(r269495)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c	Mon Aug  4 01:16:08 2014	(r269496)
@@ -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);


More information about the svn-src-stable-9 mailing list