diff options
author | mm <mm@FreeBSD.org> | 2013-03-20 09:56:20 +0000 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2013-03-20 09:56:20 +0000 |
commit | 181ede09a39a4bcb3012d6e3d54af3230a5ce7c3 (patch) | |
tree | e2dc802bc28f2ccbb648353053d45f7f12adb2e8 /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c | |
parent | 18a8e19d913846ad35de8779b4d4c1bfb73e911a (diff) | |
download | FreeBSD-src-181ede09a39a4bcb3012d6e3d54af3230a5ce7c3.zip FreeBSD-src-181ede09a39a4bcb3012d6e3d54af3230a5ce7c3.tar.gz |
Release hold on pool before calling zvol_create_minor()
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c index 4e54abc..659805d 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c @@ -2233,13 +2233,16 @@ zvol_create_minors(const char *name) return (error); } if (dmu_objset_type(os) == DMU_OST_ZVOL) { + dsl_dataset_long_hold(os->os_dsl_dataset, FTAG); + dsl_pool_rele(dmu_objset_pool(os), FTAG); if ((error = zvol_create_minor(name)) == 0) error = zvol_create_snapshots(os, name); else { printf("ZFS WARNING: Unable to create ZVOL %s (error=%d).\n", name, error); } - dmu_objset_rele(os, FTAG); + dsl_dataset_long_rele(os->os_dsl_dataset, FTAG); + dsl_dataset_rele(os->os_dsl_dataset, FTAG); return (error); } if (dmu_objset_type(os) != DMU_OST_ZFS) { |