@@ -1503,8 +1503,8 @@ dbuf_read_verify_dnode_crypt(dmu_buf_impl_t *db, uint32_t flags)
1503
1503
1504
1504
ASSERT (MUTEX_HELD (& db -> db_mtx ));
1505
1505
1506
- if (! os -> os_encrypted || os -> os_raw_receive ||
1507
- ( flags & DB_RF_NO_DECRYPT ) != 0 )
1506
+ if (( flags & DB_RF_NO_DECRYPT ) != 0 ||
1507
+ ! os -> os_encrypted || os -> os_raw_receive )
1508
1508
return (0 );
1509
1509
1510
1510
DB_DNODE_ENTER (db );
@@ -1738,8 +1738,6 @@ dbuf_read(dmu_buf_impl_t *db, zio_t *zio, uint32_t flags)
1738
1738
1739
1739
mutex_enter (& db -> db_mtx );
1740
1740
if (db -> db_state == DB_CACHED ) {
1741
- spa_t * spa = dn -> dn_objset -> os_spa ;
1742
-
1743
1741
/*
1744
1742
* Ensure that this block's dnode has been decrypted if
1745
1743
* the caller has requested decrypted data.
@@ -1758,6 +1756,7 @@ dbuf_read(dmu_buf_impl_t *db, zio_t *zio, uint32_t flags)
1758
1756
(arc_is_encrypted (db -> db_buf ) ||
1759
1757
arc_is_unauthenticated (db -> db_buf ) ||
1760
1758
arc_get_compression (db -> db_buf ) != ZIO_COMPRESS_OFF )) {
1759
+ spa_t * spa = dn -> dn_objset -> os_spa ;
1761
1760
zbookmark_phys_t zb ;
1762
1761
1763
1762
SET_BOOKMARK (& zb , dmu_objset_id (db -> db_objset ),
@@ -1774,13 +1773,13 @@ dbuf_read(dmu_buf_impl_t *db, zio_t *zio, uint32_t flags)
1774
1773
DB_DNODE_EXIT (db );
1775
1774
DBUF_STAT_BUMP (hash_hits );
1776
1775
} else if (db -> db_state == DB_UNCACHED ) {
1777
- spa_t * spa = dn -> dn_objset -> os_spa ;
1778
1776
boolean_t need_wait = B_FALSE ;
1779
1777
1780
1778
db_lock_type_t dblt = dmu_buf_lock_parent (db , RW_READER , FTAG );
1781
1779
1782
1780
if (zio == NULL &&
1783
1781
db -> db_blkptr != NULL && !BP_IS_HOLE (db -> db_blkptr )) {
1782
+ spa_t * spa = dn -> dn_objset -> os_spa ;
1784
1783
zio = zio_root (spa , NULL , NULL , ZIO_FLAG_CANFAIL );
1785
1784
need_wait = B_TRUE ;
1786
1785
}
0 commit comments