Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Mar 2014 02:41:34 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r262676 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201403020241.s222fYnB003863@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403020241.s222fYnB003863>