From 1a9168324a42cd364cc8a7695f0fc559da09c979 Mon Sep 17 00:00:00 2001 From: Tim Chase Date: Sun, 13 Oct 2013 23:06:51 -0500 Subject: [PATCH] Fix nvlist alocation in vdev_config_generate(). Remove extra #define of ASSERT0. --- lib/libspl/include/assert.h | 1 - module/zfs/vdev_label.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/libspl/include/assert.h b/lib/libspl/include/assert.h index 03468ece1851..4fc25477a4e6 100644 --- a/lib/libspl/include/assert.h +++ b/lib/libspl/include/assert.h @@ -95,7 +95,6 @@ extern void __assert(const char *, const char *, int); #define ASSERT3P(x, y, z) VERIFY3P(x, y, z) #define ASSERT0(x) VERIFY0(x) #define ASSERTV(x) x -#define ASSERT0(x) VERIFY3_IMPL(x, ==, 0, uintmax_t) #endif /* NDEBUG */ #endif /* _LIBSPL_ASSERT_H */ diff --git a/module/zfs/vdev_label.c b/module/zfs/vdev_label.c index 6f96102d40ee..4273bd92dea3 100644 --- a/module/zfs/vdev_label.c +++ b/module/zfs/vdev_label.c @@ -216,7 +216,7 @@ vdev_config_generate(spa_t *spa, vdev_t *vd, boolean_t getstats, { nvlist_t *nv = NULL; - nv = fnvlist_alloc(); + VERIFY0(nvlist_alloc(&nv, NV_UNIQUE_NAME, KM_PUSHPAGE)); fnvlist_add_string(nv, ZPOOL_CONFIG_TYPE, vd->vdev_ops->vdev_op_type); if (!(flags & (VDEV_CONFIG_SPARE | VDEV_CONFIG_L2CACHE)))