dmu_buf_impl_t *db, *db_next;
uint64_t txg = tx->tx_txg;
avl_index_t where;
+ dbuf_dirty_record_t *dr;
if (end_blkid > dn->dn_maxblkid &&
!(start_blkid == DMU_SPILL_BLKID || end_blkid == DMU_SPILL_BLKID))
}
/* The dbuf is referenced */
- if (!list_is_empty(&db->db_dirty_records)) {
- dbuf_dirty_record_t *dr;
-
- dr = list_head(&db->db_dirty_records);
+ dr = list_head(&db->db_dirty_records);
+ if (dr != NULL) {
if (dr->dr_txg == txg) {
/*
* This buffer is "in-use", re-adjust the file
db->db.db_size = size;
dr = list_head(&db->db_dirty_records);
+ /* dirty record added by dmu_buf_will_dirty() */
+ VERIFY(dr != NULL);
if (db->db_level == 0)
dr->dt.dl.dr_data = buf;
ASSERT3U(dr->dr_txg, ==, tx->tx_txg);