summaryrefslogtreecommitdiffstats
path: root/cddl/contrib/opensolaris/cmd/zfs
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2015-11-13 09:42:59 +0000
committermav <mav@FreeBSD.org>2015-11-13 09:42:59 +0000
commit5f4b8bb38957cc90b927000d0e53109f7a5d9f7a (patch)
tree97e5494dec4dbde7d5c571e9f6d87eaa34d33584 /cddl/contrib/opensolaris/cmd/zfs
parent1c6d93b28d4a7323e87f605b6c1c15c61c226e8f (diff)
downloadFreeBSD-src-5f4b8bb38957cc90b927000d0e53109f7a5d9f7a.zip
FreeBSD-src-5f4b8bb38957cc90b927000d0e53109f7a5d9f7a.tar.gz
MFC r289500: 6298 zfs_create_008_neg and zpool_create_023_neg need to be
updated for large block support. Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: John Kennedy <john.kennedy@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Author: Joe Stein <joe.stein@delphix.com> illumos/illumos-gate@e9316f7696401f3e5e263a5939031cb8d5641a88
Diffstat (limited to 'cddl/contrib/opensolaris/cmd/zfs')
-rw-r--r--cddl/contrib/opensolaris/cmd/zfs/zfs_main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c b/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
index 8381b55..b48aa4d 100644
--- a/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
+++ b/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
@@ -21,7 +21,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2011, 2014 by Delphix. All rights reserved.
+ * Copyright (c) 2011, 2015 by Delphix. All rights reserved.
* Copyright 2012 Milan Jurik. All rights reserved.
* Copyright (c) 2012, Joyent, Inc. All rights reserved.
* Copyright (c) 2011-2012 Pawel Jakub Dawidek <pawel@dawidek.net>.
@@ -861,7 +861,6 @@ zfs_do_create(int argc, char **argv)
goto error;
spa_version = zpool_get_prop_int(zpool_handle,
ZPOOL_PROP_VERSION, NULL);
- zpool_close(zpool_handle);
if (spa_version >= SPA_VERSION_REFRESERVATION)
resv_prop = ZFS_PROP_REFRESERVATION;
else
@@ -870,8 +869,11 @@ zfs_do_create(int argc, char **argv)
(void) snprintf(msg, sizeof (msg),
gettext("cannot create '%s'"), argv[0]);
if (props && (real_props = zfs_valid_proplist(g_zfs, type,
- props, 0, NULL, msg)) == NULL)
+ props, 0, NULL, zpool_handle, msg)) == NULL) {
+ zpool_close(zpool_handle);
goto error;
+ }
+ zpool_close(zpool_handle);
volsize = zvol_volsize_to_reservation(volsize, real_props);
nvlist_free(real_props);
OpenPOWER on IntegriCloud