Skip to content

Commit

Permalink
5770 Add load_nvlist() error handling
Browse files Browse the repository at this point in the history
Reviewed by: Matthew Ahrens <[email protected]>
Reviewed by: George Wilson <[email protected]>
Reviewed by: Prakash Surya <[email protected]>
Reviewed by: Richard Elling <[email protected]>
Reviewed by: Richard PALO <[email protected]>
Approved by: Richard Lowe <[email protected]>
  • Loading branch information
behlendorf authored and ahrens committed Apr 5, 2015
1 parent 05c2421 commit a45f1c3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion usr/src/uts/common/fs/zfs/spa.c
Original file line number Diff line number Diff line change
Expand Up @@ -1575,7 +1575,10 @@ 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);

Expand Down

0 comments on commit a45f1c3

Please sign in to comment.