Author: delphij
Date: Sun Mar  2 02:41:33 2014
New Revision: 262676
URL: http://svnweb.freebsd.org/changeset/base/262676

Log:
  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

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c   Sun Mar  2 
02:35:46 2014        (r262675)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c   Sun Mar  2 
02:41:33 2014        (r262676)
@@ -1594,7 +1594,9 @@ load_nvlist(spa_t *spa, uint64_t obj, nv
        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);
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to