Print this page
3743 zfs needs a refcount audit
Submitted by: Will Andrews <willa@spectralogic.com>
Submitted by: Justin Gibbs <justing@spectralogic.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
*** 354,365 ****
if (err != 0)
return (err);
/* Make sure dsobj has the correct object type. */
dmu_object_info_from_db(dbuf, &doi);
! if (doi.doi_type != DMU_OT_DSL_DATASET)
return (SET_ERROR(EINVAL));
ds = dmu_buf_get_user(dbuf);
if (ds == NULL) {
dsl_dataset_t *winner = NULL;
--- 354,367 ----
if (err != 0)
return (err);
/* Make sure dsobj has the correct object type. */
dmu_object_info_from_db(dbuf, &doi);
! if (doi.doi_type != DMU_OT_DSL_DATASET) {
! dmu_buf_rele(dbuf, tag);
return (SET_ERROR(EINVAL));
+ }
ds = dmu_buf_get_user(dbuf);
if (ds == NULL) {
dsl_dataset_t *winner = NULL;