6790232 zfs related assertion failure: vp->v_filocks == 0L, file: ../../common/fs/vnode.c, line: 2344
authorChris Kirby <chris.kirby@sun.com>
Fri, 19 Jun 2009 08:51:49 -0600
changeset 9909 aa280f585a3e
parent 9908 4b4177fc63d9
child 9910 b06e0c019bda
6790232 zfs related assertion failure: vp->v_filocks == 0L, file: ../../common/fs/vnode.c, line: 2344
usr/src/uts/common/fs/zfs/zfs_vnops.c
--- a/usr/src/uts/common/fs/zfs/zfs_vnops.c	Fri Jun 19 06:14:38 2009 -0700
+++ b/usr/src/uts/common/fs/zfs/zfs_vnops.c	Fri Jun 19 08:51:49 2009 -0600
@@ -208,6 +208,12 @@
 	znode_t	*zp = VTOZ(vp);
 	zfsvfs_t *zfsvfs = zp->z_zfsvfs;
 
+	/*
+	 * Clean up any locks held by this process on the vp.
+	 */
+	cleanlocks(vp, ddi_get_pid(), 0);
+	cleanshares(vp, ddi_get_pid());
+
 	ZFS_ENTER(zfsvfs);
 	ZFS_VERIFY_ZP(zp);
 
@@ -215,12 +221,6 @@
 	if ((flag & (FSYNC | FDSYNC)) && (count == 1))
 		atomic_dec_32(&zp->z_sync_cnt);
 
-	/*
-	 * Clean up any locks held by this process on the vp.
-	 */
-	cleanlocks(vp, ddi_get_pid(), 0);
-	cleanshares(vp, ddi_get_pid());
-
 	if (!zfs_has_ctldir(zp) && zp->z_zfsvfs->z_vscan &&
 	    ZTOV(zp)->v_type == VREG &&
 	    !(zp->z_phys->zp_flags & ZFS_AV_QUARANTINED) &&