@@ -512,7 +512,7 @@ dsl_dir_init_fs_ss_count(dsl_dir_t *dd, dmu_tx_t *tx)
512
512
zap_attribute_t * za ;
513
513
dsl_dataset_t * ds ;
514
514
515
- ASSERT (spa_feature_is_enabled (dp -> dp_spa , SPA_FEATURE_FS_SS_LIMIT ));
515
+ ASSERT (spa_feature_is_active (dp -> dp_spa , SPA_FEATURE_FS_SS_LIMIT ));
516
516
ASSERT (dsl_pool_config_held (dp ));
517
517
ASSERT (dmu_tx_is_syncing (tx ));
518
518
@@ -1751,7 +1751,7 @@ dsl_dir_rename_check(void *arg, dmu_tx_t *tx)
1751
1751
}
1752
1752
1753
1753
if (dmu_tx_is_syncing (tx )) {
1754
- if (spa_feature_is_enabled (dp -> dp_spa ,
1754
+ if (spa_feature_is_active (dp -> dp_spa ,
1755
1755
SPA_FEATURE_FS_SS_LIMIT )) {
1756
1756
/*
1757
1757
* Although this is the check function and we don't
@@ -1780,8 +1780,11 @@ dsl_dir_rename_check(void *arg, dmu_tx_t *tx)
1780
1780
err = zap_lookup (os , dd -> dd_object ,
1781
1781
DD_FIELD_FILESYSTEM_COUNT , sizeof (fs_cnt ), 1 ,
1782
1782
& fs_cnt );
1783
- if (err != ENOENT && err != 0 )
1783
+ if (err != ENOENT && err != 0 ) {
1784
+ dsl_dir_rele (newparent , FTAG );
1785
+ dsl_dir_rele (dd , FTAG );
1784
1786
return (err );
1787
+ }
1785
1788
1786
1789
/*
1787
1790
* have to add 1 for the filesystem itself that we're
@@ -1792,8 +1795,11 @@ dsl_dir_rename_check(void *arg, dmu_tx_t *tx)
1792
1795
err = zap_lookup (os , dd -> dd_object ,
1793
1796
DD_FIELD_SNAPSHOT_COUNT , sizeof (ss_cnt ), 1 ,
1794
1797
& ss_cnt );
1795
- if (err != ENOENT && err != 0 )
1798
+ if (err != ENOENT && err != 0 ) {
1799
+ dsl_dir_rele (newparent , FTAG );
1800
+ dsl_dir_rele (dd , FTAG );
1796
1801
return (err );
1802
+ }
1797
1803
}
1798
1804
1799
1805
/* no rename into our descendant */
@@ -1844,7 +1850,7 @@ dsl_dir_rename_sync(void *arg, dmu_tx_t *tx)
1844
1850
* We already made sure the dd counts were initialized in the
1845
1851
* check function.
1846
1852
*/
1847
- if (spa_feature_is_enabled (dp -> dp_spa ,
1853
+ if (spa_feature_is_active (dp -> dp_spa ,
1848
1854
SPA_FEATURE_FS_SS_LIMIT )) {
1849
1855
VERIFY0 (zap_lookup (os , dd -> dd_object ,
1850
1856
DD_FIELD_FILESYSTEM_COUNT , sizeof (fs_cnt ), 1 ,
0 commit comments