diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c index 69462c47aad8..cc1624d054d3 100644 --- a/cmd/zdb/zdb.c +++ b/cmd/zdb/zdb.c @@ -6754,6 +6754,7 @@ zdb_brt_entry_compare(const void *zcn1, const void *zcn2) return (cmp); } +static int chain_map_count_blk_cb(spa_t *spa, const blkptr_t *bp, void *arg) { (void) spa; diff --git a/module/zfs/zil.c b/module/zfs/zil.c index 6edee81caca4..a996ff171c69 100644 --- a/module/zfs/zil.c +++ b/module/zfs/zil.c @@ -1447,7 +1447,6 @@ zil_lwb_flush_defer(lwb_t *lwb, lwb_t *nlwb) * future writes to additional vdevs. */ mutex_enter(&nlwb->lwb_vdev_lock); - mutex_exit(&lwb->lwb_zilog->zl_lock); /* * Tear down the 'lwb' vdev tree, ensuring that entries which do not * exist in 'nlwb' are moved to it, freeing any would-be duplicates. @@ -1641,10 +1640,10 @@ zil_lwb_write_done(zio_t *zio) nlwb = list_next(&zilog->zl_lwb_list, lwb); if (nlwb && nlwb->lwb_state != LWB_STATE_ISSUED) nlwb = NULL; - if (avl_numnodes(t) == 0) { - mutex_exit(&zilog->zl_lock); + mutex_exit(&zilog->zl_lock); + + if (avl_numnodes(t) == 0) return; - } /* * If there was an IO error, we're not going to call zio_flush() @@ -1660,7 +1659,6 @@ zil_lwb_write_done(zio_t *zio) * that function). */ if (zio->io_error != 0) { - mutex_exit(&zilog->zl_lock); while ((zv = avl_destroy_nodes(t, &cookie)) != NULL) kmem_free(zv, sizeof (*zv)); return; @@ -1686,8 +1684,6 @@ zil_lwb_write_done(zio_t *zio) ASSERT(avl_is_empty(&lwb->lwb_vdev_tree)); return; } - mutex_enter(&lwb->lwb_vdev_lock); - mutex_exit(&zilog->zl_lock); while ((zv = avl_destroy_nodes(t, &cookie)) != NULL) { vdev_t *vd = vdev_lookup_top(spa, zv->zv_vdev); @@ -1704,7 +1700,6 @@ zil_lwb_write_done(zio_t *zio) } kmem_free(zv, sizeof (*zv)); } - mutex_exit(&lwb->lwb_vdev_lock); } /*