diff options
author | delphij <delphij@FreeBSD.org> | 2014-03-17 19:09:00 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2014-03-17 19:09:00 +0000 |
commit | 78a6a604266b47f384179179d5e7c8f3677dfb5d (patch) | |
tree | 9c8a46c7196a17c1f89d2cb890cda69b2e5c94a9 /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c | |
parent | 7024a257ca035c8d95327243949a5845d38a30d0 (diff) | |
download | FreeBSD-src-78a6a604266b47f384179179d5e7c8f3677dfb5d.zip FreeBSD-src-78a6a604266b47f384179179d5e7c8f3677dfb5d.tar.gz |
MFC r262676:
All callers of static method load_nvlist() in spa.c handles error case,
so there is no reason to assert that we won't hit an error. Instead,
just return that error to caller and have the upper layer handle it.
Obtained from: FreeNAS
Reported by: rodrigc
Reviewed by: Matthew Ahrens
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c index 6b51705..0ab0188 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c @@ -1594,7 +1594,9 @@ load_nvlist(spa_t *spa, uint64_t obj, nvlist_t **value) int error; *value = NULL; - VERIFY(0 == dmu_bonus_hold(spa->spa_meta_objset, obj, FTAG, &db)); + error = dmu_bonus_hold(spa->spa_meta_objset, obj, FTAG, &db); + if (error != 0) + return (error); nvsize = *(uint64_t *)db->db_data; dmu_buf_rele(db, FTAG); |