# HG changeset patch # User Mark Shellenbaum # Date 1249345971 21600 # Node ID b179ceb34b623087ca3eace57ab6a6a0f2731a65 # Parent 1e37fc71a3af55c366ff7dfc42bcddfb744e9d75 6867395 zpool_upgrade_007_pos testcase panic'd with BAD TRAP: type=e (#pf Page fault) diff -r 1e37fc71a3af -r b179ceb34b62 usr/src/uts/common/fs/zfs/zfs_znode.c --- 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); }