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
This commit is contained in:
Xin LI
2014-03-02 02:41:33 +00:00
parent 8c82820bc3
commit ba680558a0
@@ -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);