aboutsummaryrefslogtreecommitdiffstats
path: root/include/sys
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <[email protected]>2023-03-24 18:18:35 +0100
committerGitHub <[email protected]>2023-03-24 10:18:35 -0700
commitce0e1cc402505493a890e7fc0819e582ae686b3b (patch)
tree9d95cbe796e9cd5395d93d333c8a8489eb078a49 /include/sys
parent5b5f518687551b5e245d7515d0c81b174c47acfb (diff)
Fix cloning into already dirty dbufs.
Undirty the dbuf and destroy its buffer when cloning into it. Coverity ID: CID-1535375 Reported-by: Richard Yao Reported-by: Benjamin Coddington Reviewed-by: Richard Yao <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Pawel Jakub Dawidek <[email protected]> Closes #14655
Diffstat (limited to 'include/sys')
-rw-r--r--include/sys/dbuf.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sys/dbuf.h b/include/sys/dbuf.h
index a06316362..fb26a83b1 100644
--- a/include/sys/dbuf.h
+++ b/include/sys/dbuf.h
@@ -382,6 +382,7 @@ void dbuf_assign_arcbuf(dmu_buf_impl_t *db, arc_buf_t *buf, dmu_tx_t *tx);
dbuf_dirty_record_t *dbuf_dirty(dmu_buf_impl_t *db, dmu_tx_t *tx);
dbuf_dirty_record_t *dbuf_dirty_lightweight(dnode_t *dn, uint64_t blkid,
dmu_tx_t *tx);
+boolean_t dbuf_undirty(dmu_buf_impl_t *db, dmu_tx_t *tx);
arc_buf_t *dbuf_loan_arcbuf(dmu_buf_impl_t *db);
void dmu_buf_write_embedded(dmu_buf_t *dbuf, void *data,
bp_embedded_type_t etype, enum zio_compress comp,