From 7e0b4f7fa5c95691d937e67b94f3b5213edc63dd Mon Sep 17 00:00:00 2001 From: avg Date: Thu, 9 Nov 2017 18:14:42 +0000 Subject: [PATCH] MFV r325607: 8607 zfs: variable set but not used illumos/illumos-gate@b852c2f54326f8ac1daa372a88bfe951dd7e20ed https://github.com/illumos/illumos-gate/commit/b852c2f54326f8ac1daa372a88bfe951dd7e20ed https://www.illumos.org/issues/8607 Reviewed by: Yuri Pankov Reviewed by: Igor Kozhukhov Reviewed by: Matthew Ahrens Approved by: Robert Mustacchi Author: Toomas Soome MFC after: 1 week --- .../opensolaris/uts/common/fs/zfs/dsl_pool.c | 14 ++++++++------ .../opensolaris/uts/common/fs/zfs/zfs_ioctl.c | 10 +++------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c index 15836e1aa350..f45a1f1d8440 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c @@ -487,7 +487,6 @@ dsl_pool_create(spa_t *spa, nvlist_t *zplprops, uint64_t txg) int err; dsl_pool_t *dp = dsl_pool_open_impl(spa, txg); dmu_tx_t *tx = dmu_tx_create_assigned(dp, txg); - objset_t *os; dsl_dataset_t *ds; uint64_t obj; @@ -538,12 +537,15 @@ dsl_pool_create(spa_t *spa, nvlist_t *zplprops, uint64_t txg) /* create the root objset */ VERIFY0(dsl_dataset_hold_obj(dp, obj, FTAG, &ds)); - rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); - os = dmu_objset_create_impl(dp->dp_spa, ds, - dsl_dataset_get_blkptr(ds), DMU_OST_ZFS, tx); - rrw_exit(&ds->ds_bp_rwlock, FTAG); #ifdef _KERNEL - zfs_create_fs(os, kcred, zplprops, tx); + { + objset_t *os; + rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG); + os = dmu_objset_create_impl(dp->dp_spa, ds, + dsl_dataset_get_blkptr(ds), DMU_OST_ZFS, tx); + rrw_exit(&ds->ds_bp_rwlock, FTAG); + zfs_create_fs(os, kcred, zplprops, tx); + } #endif dsl_dataset_rele(ds, FTAG); diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c index 1fb8ea62a543..a3285bff434e 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c @@ -5827,10 +5827,6 @@ zfs_ioc_send_space(const char *snapname, nvlist_t *innvl, nvlist_t *outnvl) dsl_dataset_t *tosnap; int error; char *fromname; - /* LINTED E_FUNC_SET_NOT_USED */ - boolean_t largeblockok; - /* LINTED E_FUNC_SET_NOT_USED */ - boolean_t embedok; boolean_t compressok; uint64_t space; @@ -5844,8 +5840,6 @@ zfs_ioc_send_space(const char *snapname, nvlist_t *innvl, nvlist_t *outnvl) return (error); } - largeblockok = nvlist_exists(innvl, "largeblockok"); - embedok = nvlist_exists(innvl, "embedok"); compressok = nvlist_exists(innvl, "compressok"); error = nvlist_lookup_string(innvl, "from", &fromname); @@ -5886,7 +5880,9 @@ zfs_ioc_send_space(const char *snapname, nvlist_t *innvl, nvlist_t *outnvl) goto out; } } else { - // If estimating the size of a full send, use dmu_send_estimate + /* + * If estimating the size of a full send, use dmu_send_estimate. + */ error = dmu_send_estimate(tosnap, NULL, compressok, &space); }