diff options
author | delphij <delphij@FreeBSD.org> | 2014-03-02 02:41:33 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2014-03-02 02:41:33 +0000 |
commit | 6ab407aa011fd2d31995ca00cfacddd4a93a9038 (patch) | |
tree | 724de84c07d96baba82b30c541284ecaf8c3c488 /sys/cddl | |
parent | 97ad1f3cd15b984e3fe85b74693a1dd47e6e9675 (diff) | |
download | FreeBSD-src-6ab407aa011fd2d31995ca00cfacddd4a93a9038.zip FreeBSD-src-6ab407aa011fd2d31995ca00cfacddd4a93a9038.tar.gz |
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
MFC after: 2 weeks
Diffstat (limited to 'sys/cddl')
-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 1737269..6ab48ca 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); |