diff usr/src/uts/common/fs/zfs/zfs_vfsops.c @ 4480:0976678e58c5

6544140 assertion failed: err == 0 (0x11 == 0x0), file: ../../common/fs/zfs/zfs_znode.c, line: 555 6565044 small race condition between zfs_umount() and ZFS_ENTER()
author gw25295
date Fri, 15 Jun 2007 15:04:37 -0700
parents f6891a60bd72
children 12bb2876a62e
line wrap: on
line diff
--- a/usr/src/uts/common/fs/zfs/zfs_vfsops.c	Fri Jun 15 10:21:53 2007 -0700
+++ b/usr/src/uts/common/fs/zfs/zfs_vfsops.c	Fri Jun 15 15:04:37 2007 -0700
@@ -1011,6 +1011,12 @@
 		zfsvfs->z_unmounted1 = B_TRUE;
 
 		/*
+		 * Ensure that z_unmounted1 reaches global visibility
+		 * before z_op_cnt.
+		 */
+		membar_producer();
+
+		/*
 		 * Wait for all zfs threads to leave zfs.
 		 * Grabbing a rwlock as reader in all vops and
 		 * as writer here doesn't work because it too easy to get