summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/zfs/spa.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/module/zfs/spa.c b/module/zfs/spa.c
index 3b63427c2..374322a03 100644
--- a/module/zfs/spa.c
+++ b/module/zfs/spa.c
@@ -200,7 +200,7 @@ spa_prop_get_config(spa_t *spa, nvlist_t **nvp)
vdev_t *rvd = spa->spa_root_vdev;
dsl_pool_t *pool = spa->spa_dsl_pool;
uint64_t size, alloc, cap, version;
- zprop_source_t src = ZPROP_SRC_NONE;
+ const zprop_source_t src = ZPROP_SRC_NONE;
spa_config_dirent_t *dp;
metaslab_class_t *mc = spa_normal_class(spa);
@@ -232,11 +232,13 @@ spa_prop_get_config(spa_t *spa, nvlist_t **nvp)
rvd->vdev_state, src);
version = spa_version(spa);
- if (version == zpool_prop_default_numeric(ZPOOL_PROP_VERSION))
- src = ZPROP_SRC_DEFAULT;
- else
- src = ZPROP_SRC_LOCAL;
- spa_prop_add_list(*nvp, ZPOOL_PROP_VERSION, NULL, version, src);
+ if (version == zpool_prop_default_numeric(ZPOOL_PROP_VERSION)) {
+ spa_prop_add_list(*nvp, ZPOOL_PROP_VERSION, NULL,
+ version, ZPROP_SRC_DEFAULT);
+ } else {
+ spa_prop_add_list(*nvp, ZPOOL_PROP_VERSION, NULL,
+ version, ZPROP_SRC_LOCAL);
+ }
}
if (pool != NULL) {