mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 03:08:51 +03:00
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:
@@ -2119,9 +2119,6 @@ dsl_crypto_recv_raw_objset_sync(dsl_dataset_t *ds, dmu_objset_type_t ostype,
|
||||
zio = zio_root(dp->dp_spa, NULL, NULL, ZIO_FLAG_MUSTSUCCEED);
|
||||
dsl_dataset_sync(ds, zio, tx);
|
||||
VERIFY0(zio_wait(zio));
|
||||
|
||||
/* dsl_dataset_sync_done will drop this reference. */
|
||||
dmu_buf_add_ref(ds->ds_dbuf, ds);
|
||||
dsl_dataset_sync_done(ds, tx);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user