6867395 zpool_upgrade_007_pos testcase panic'd with BAD TRAP: type=e (#pf Page fault)
--- a/usr/src/uts/common/fs/zfs/zfs_znode.c Mon Aug 03 18:24:01 2009 -0400
+++ b/usr/src/uts/common/fs/zfs/zfs_znode.c Mon Aug 03 18:32:51 2009 -0600
@@ -200,7 +200,18 @@
nzp->z_sync_cnt = ozp->z_sync_cnt;
nzp->z_phys = ozp->z_phys;
nzp->z_dbuf = ozp->z_dbuf;
- nzp->z_acl_cached = ozp->z_acl_cached;
+
+ /*
+ * Release any cached ACL, since it *may* have
+ * zfs_acl_node_t's that directly references an
+ * embedded ACL in the zp_acl of the old znode_phys_t
+ *
+ * It will be recached the next time the ACL is needed.
+ */
+ if (ozp->z_acl_cached) {
+ zfs_acl_free(ozp->z_acl_cached);
+ ozp->z_acl_cached = NULL;
+ }
/* Update back pointers. */
(void) dmu_buf_update_user(nzp->z_dbuf, ozp, nzp, &nzp->z_phys,
@@ -213,7 +224,6 @@
* subsequent callback.
*/
ozp->z_dbuf = NULL;
- ozp->z_acl_cached = NULL;
POINTER_INVALIDATE(&ozp->z_zfsvfs);
}