svn commit: r263270 - in stable: 8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

Xin LI delphij at FreeBSD.org
Mon Mar 17 19:09:39 UTC 2014


Author: delphij
Date: Mon Mar 17 19:09:39 2014
New Revision: 263270
URL: http://svnweb.freebsd.org/changeset/base/263270

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

Modified:
  stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/cddl/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
==============================================================================
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c	Mon Mar 17 19:09:00 2014	(r263269)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c	Mon Mar 17 19:09:39 2014	(r263270)
@@ -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);
 


More information about the svn-src-stable-9 mailing list