Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Oct 2016 11:48:48 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r307143 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201610121148.u9CBmm8M064519@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Wed Oct 12 11:48:47 2016
New Revision: 307143
URL: https://svnweb.freebsd.org/changeset/base/307143

Log:
  MFC r306665: zfs: fix a wrong assertion for extended attributes
  
  PR:		213112

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

Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
==============================================================================
--- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c	Wed Oct 12 11:48:14 2016	(r307142)
+++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c	Wed Oct 12 11:48:47 2016	(r307143)
@@ -1454,7 +1454,8 @@ zfs_lookup_lock(vnode_t *dvp, vnode_t *v
 
 	ASSERT_VOP_LOCKED(dvp, __func__);
 #ifdef DIAGNOSTIC
-	ASSERT(!RRM_LOCK_HELD(&zfsvfs->z_teardown_lock));
+	if ((zdp->z_pflags & ZFS_XATTR) == 0)
+		VERIFY(!RRM_LOCK_HELD(&zfsvfs->z_teardown_lock));
 #endif
 
 	if (name[0] == 0 || (name[0] == '.' && name[1] == 0)) {
@@ -6017,13 +6018,15 @@ zfs_lock(ap)
 	vp = ap->a_vp;
 	flags = ap->a_flags;
 	if ((flags & LK_INTERLOCK) == 0 && (flags & LK_NOWAIT) == 0 &&
-	    (vp->v_iflag & VI_DOOMED) == 0 && (zp = vp->v_data) != NULL) {
+	    (vp->v_iflag & VI_DOOMED) == 0 && (zp = vp->v_data) != NULL &&
+	    (zp->z_pflags & ZFS_XATTR) == 0) {
 		zfsvfs = zp->z_zfsvfs;
 		VERIFY(!RRM_LOCK_HELD(&zfsvfs->z_teardown_lock));
 	}
 	err = vop_stdlock(ap);
 	if ((flags & LK_INTERLOCK) != 0 && (flags & LK_NOWAIT) == 0 &&
-	    (vp->v_iflag & VI_DOOMED) == 0 && (zp = vp->v_data) != NULL) {
+	    (vp->v_iflag & VI_DOOMED) == 0 && (zp = vp->v_data) != NULL &&
+	    (zp->z_pflags & ZFS_XATTR) == 0) {
 		zfsvfs = zp->z_zfsvfs;
 		VERIFY(!RRM_LOCK_HELD(&zfsvfs->z_teardown_lock));
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610121148.u9CBmm8M064519>