Move dmu_buf_rele() after dsl_dataset_sync_done()

Otherwise the dataset may be freed after the last dmu_buf_rele() leading
to a panic.

Reviewed-by: Mark Maybee <mark.maybee@delphix.com>
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Signed-off-by: George Amanakis <gamanakis@gmail.com>
Closes #14522
Closes #14523
This commit is contained in:
George Amanakis
2023-02-24 02:14:52 +01:00
committed by GitHub
parent 6109d83df8
commit d816bc5ec7
4 changed files with 4 additions and 10 deletions
+1
View File
@@ -788,6 +788,7 @@ dsl_pool_sync(dsl_pool_t *dp, uint64_t txg)
}
dsl_dataset_sync_done(ds, tx);
dmu_buf_rele(ds->ds_dbuf, ds);
}
while ((dd = txg_list_remove(&dp->dp_dirty_dirs, txg)) != NULL) {