diff --git a/zfs/lib/libzpool/dbuf.c b/zfs/lib/libzpool/dbuf.c index d04610317a..3c6a6ac5b1 100644 --- a/zfs/lib/libzpool/dbuf.c +++ b/zfs/lib/libzpool/dbuf.c @@ -1988,6 +1988,10 @@ dbuf_sync_leaf(dbuf_dirty_record_t *dr, dmu_tx_t *tx) drp = &(*drp)->dr_next; ASSERT(dr->dr_next == NULL); *drp = dr->dr_next; + if (dr->dr_dbuf->db_level != 0) { + mutex_destroy(&dr->dt.di.dr_mtx); + list_destroy(&dr->dt.di.dr_children); + } kmem_free(dr, sizeof (dbuf_dirty_record_t)); ASSERT(db->db_dirtycnt > 0); db->db_dirtycnt -= 1; diff --git a/zfs/lib/libzpool/dnode_sync.c b/zfs/lib/libzpool/dnode_sync.c index 779cfc96f9..76d3481c01 100644 --- a/zfs/lib/libzpool/dnode_sync.c +++ b/zfs/lib/libzpool/dnode_sync.c @@ -440,6 +440,8 @@ dnode_undirty_dbufs(list_t *list) } else { mutex_exit(&db->db_mtx); dnode_undirty_dbufs(&dr->dt.di.dr_children); + mutex_destroy(&dr->dt.di.dr_mtx); + list_destroy(&dr->dt.di.dr_children); } kmem_free(dr, sizeof (dbuf_dirty_record_t)); dbuf_rele(db, (void *)(uintptr_t)txg); diff --git a/zfs/lib/libzpool/zfs_znode.c b/zfs/lib/libzpool/zfs_znode.c index 25751ae5f8..4a1820940c 100644 --- a/zfs/lib/libzpool/zfs_znode.c +++ b/zfs/lib/libzpool/zfs_znode.c @@ -1574,6 +1574,8 @@ zfs_create_fs(objset_t *os, cred_t *cr, nvlist_t *zplprops, dmu_tx_t *tx) if (sense == ZFS_CASE_INSENSITIVE || sense == ZFS_CASE_MIXED) zfsvfs.z_norm |= U8_TEXTPREP_TOUPPER; + /* XXX - This must be destroyed but I'm not quite sure yet so + * I'm just annotating that fact when it's an issue. -Brian */ mutex_init(&zfsvfs.z_znodes_lock, NULL, MUTEX_DEFAULT, NULL); list_create(&zfsvfs.z_all_znodes, sizeof (znode_t), offsetof(znode_t, z_link_node));