diff options
-rw-r--r-- | module/zfs/zvol.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c index 8ca510b79..cff3da8b4 100644 --- a/module/zfs/zvol.c +++ b/module/zfs/zvol.c @@ -419,11 +419,12 @@ zvol_set_volsize(const char *name, uint64_t volsize) goto out; error = zvol_update_volsize(volsize, os); - kmem_free(doi, sizeof (dmu_object_info_t)); if (error == 0 && zv != NULL) error = zvol_update_live_volsize(zv, volsize); out: + kmem_free(doi, sizeof (dmu_object_info_t)); + if (owned) { dmu_objset_disown(os, FTAG); if (zv != NULL) |