@@ -1539,7 +1539,6 @@ dnode_hold_impl(objset_t *os, uint64_t object, int flag, int slots,
15391539 dnh = & dnc -> dnc_children [0 ];
15401540
15411541 /* Initialize dnode slot status from dnode_phys_t */
1542- rw_enter (& db -> db_rwlock , RW_READER );
15431542 for (int i = 0 ; i < epb ; i ++ ) {
15441543 zrl_init (& dnh [i ].dnh_zrlock );
15451544
@@ -1560,7 +1559,6 @@ dnode_hold_impl(objset_t *os, uint64_t object, int flag, int slots,
15601559 skip = 0 ;
15611560 }
15621561 }
1563- rw_exit (& db -> db_rwlock );
15641562
15651563 dmu_buf_init_user (& dnc -> dnc_dbu , NULL ,
15661564 dnode_buf_evict_async , NULL );
@@ -2206,11 +2204,9 @@ dnode_dirty_l1range(dnode_t *dn, uint64_t start_blkid, uint64_t end_blkid,
22062204 if (db == NULL )
22072205 db = avl_nearest (& dn -> dn_dbufs , where , AVL_AFTER );
22082206 for (; db != NULL ; db = AVL_NEXT (& dn -> dn_dbufs , db )) {
2209- mutex_enter (& db -> db_mtx );
2210- if (db -> db_level != 1 || db -> db_blkid >= end_blkid ) {
2211- mutex_exit (& db -> db_mtx );
2207+ if (db -> db_level != 1 || db -> db_blkid >= end_blkid )
22122208 break ;
2213- }
2209+ mutex_enter ( & db -> db_mtx );
22142210 if (db -> db_state != DB_EVICTING )
22152211 ASSERT (db -> db_dirtycnt > 0 );
22162212 mutex_exit (& db -> db_mtx );
0 commit comments