Skip to content

Commit

Permalink
BRT: Don't call brt_pending_remove() on holes/embedded
Browse files Browse the repository at this point in the history
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 openzfs#16740
  • Loading branch information
amotin authored and ixhamza committed Dec 2, 2024
1 parent e4001b4 commit 9ea3289
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions module/zfs/dbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2580,8 +2580,11 @@ dbuf_undirty(dmu_buf_impl_t *db, dmu_tx_t *tx)
* We are freeing a block that we cloned in the same
* transaction group.
*/
brt_pending_remove(dmu_objset_spa(db->db_objset),
&dr->dt.dl.dr_overridden_by, tx);
blkptr_t *bp = &dr->dt.dl.dr_overridden_by;
if (!BP_IS_HOLE(bp) && !BP_IS_EMBEDDED(bp)) {
brt_pending_remove(dmu_objset_spa(db->db_objset),
bp, tx);
}
}

dnode_t *dn = dr->dr_dnode;
Expand Down

0 comments on commit 9ea3289

Please sign in to comment.