Skip to content

Commit 1ee251b

Browse files
amotinbehlendorf
authored andcommitted
BRT: Don't call brt_pending_remove() on holes/embedded
We are doing exactly the same checks around all brt_pending_add(). Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Pawel Jakub Dawidek <[email protected]> Reviewed-by: Brian Atkinson <[email protected]> Signed-off-by: Alexander Motin <[email protected]> Sponsored by: iXsystems, Inc. Closes #16740
1 parent 483087b commit 1ee251b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

module/zfs/dbuf.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2578,8 +2578,11 @@ dbuf_undirty(dmu_buf_impl_t *db, dmu_tx_t *tx)
25782578
* We are freeing a block that we cloned in the same
25792579
* transaction group.
25802580
*/
2581-
brt_pending_remove(dmu_objset_spa(db->db_objset),
2582-
&dr->dt.dl.dr_overridden_by, tx);
2581+
blkptr_t *bp = &dr->dt.dl.dr_overridden_by;
2582+
if (!BP_IS_HOLE(bp) && !BP_IS_EMBEDDED(bp)) {
2583+
brt_pending_remove(dmu_objset_spa(db->db_objset),
2584+
bp, tx);
2585+
}
25832586
}
25842587

25852588
dnode_t *dn = dr->dr_dnode;

0 commit comments

Comments
 (0)