Don't use dmu_buf_is_dirty() for unassigned transaction.

The dmu_buf_is_dirty() call doesn't make sense here for two reasons:
1. txg is 0 for unassigned tx, so it was a no-op.
2. It is equivalent of checking if we have dirty records and we are doing
   this few lines earlier.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Pawel Jakub Dawidek <pawel@dawidek.net>
Closes #14825
This commit is contained in:
Pawel Jakub Dawidek
2023-05-02 15:46:14 -07:00
committed by Brian Behlendorf
parent bd8c6bd66f
commit d0d91f185e
3 changed files with 7 additions and 14 deletions
+1 -5
View File
@@ -2173,7 +2173,7 @@ restart:
int
dmu_read_l0_bps(objset_t *os, uint64_t object, uint64_t offset, uint64_t length,
dmu_tx_t *tx, blkptr_t *bps, size_t *nbpsp)
blkptr_t *bps, size_t *nbpsp)
{
dmu_buf_t **dbp, *dbuf;
dmu_buf_impl_t *db;
@@ -2235,10 +2235,6 @@ dmu_read_l0_bps(objset_t *os, uint64_t object, uint64_t offset, uint64_t length,
error = SET_ERROR(EAGAIN);
goto out;
}
if (dmu_buf_is_dirty(dbuf, tx)) {
error = SET_ERROR(EAGAIN);
goto out;
}
/*
* Make sure we clone only data blocks.
*/