diff options
author | Will Andrews <[email protected]> | 2013-06-11 09:13:38 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2013-11-04 10:55:25 -0800 |
commit | 3a84951d7dfb5357509a1ed1699f80b71f87982a (patch) | |
tree | 66827915b516d4bea8466f1fd176b39664bddf41 /module/zfs/dsl_dataset.c | |
parent | d3cc8b152edc608fa4b73d4cb5354356da6b451c (diff) |
Illumos #3743
3743 zfs needs a refcount audit
Reviewed by: Matthew Ahrens <[email protected]>
Reviewed by: Eric Schrock <[email protected]>
Reviewed by: George Wilson <[email protected]>
Approved by: Christopher Siden <[email protected]>
References:
https://www.illumos.org/issues/3743
illumos/illumos-gate@b287be1ba86043996f49b1cc34c80cc620f9b841
Ported-by: Richard Yao <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #1775
Diffstat (limited to 'module/zfs/dsl_dataset.c')
-rw-r--r-- | module/zfs/dsl_dataset.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/module/zfs/dsl_dataset.c b/module/zfs/dsl_dataset.c index 4639a43df..5ed3e8e87 100644 --- a/module/zfs/dsl_dataset.c +++ b/module/zfs/dsl_dataset.c @@ -360,8 +360,10 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uint64_t dsobj, void *tag, /* Make sure dsobj has the correct object type. */ dmu_object_info_from_db(dbuf, &doi); - if (doi.doi_type != DMU_OT_DSL_DATASET) + 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) { |