From b852c2f54326f8ac1daa372a88bfe951dd7e20ed Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Wed, 9 Aug 2017 15:50:29 +0300 Subject: [PATCH] 8607 zfs: variable set but not used Reviewed by: Yuri Pankov Reviewed by: Igor Kozhukhov Reviewed by: Matthew Ahrens Approved by: Robert Mustacchi --- usr/src/uts/common/fs/zfs/dsl_pool.c | 14 ++++++++------ usr/src/uts/common/fs/zfs/zfs_ioctl.c | 10 +++------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/usr/src/uts/common/fs/zfs/dsl_pool.c b/usr/src/uts/common/fs/zfs/dsl_pool.c index ac7079fdc7..63e6aa6cca 100644 --- a/usr/src/uts/common/fs/zfs/dsl_pool.c +++ b/usr/src/uts/common/fs/zfs/dsl_pool.c @@ -387,7 +387,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; @@ -438,12 +437,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/usr/src/uts/common/fs/zfs/zfs_ioctl.c b/usr/src/uts/common/fs/zfs/zfs_ioctl.c index 52cf0145e3..a8543c6abc 100644 --- a/usr/src/uts/common/fs/zfs/zfs_ioctl.c +++ b/usr/src/uts/common/fs/zfs/zfs_ioctl.c @@ -5554,10 +5554,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; @@ -5571,8 +5567,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); @@ -5613,7 +5607,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); } -- 2.11.4.GIT