From owner-svn-src-all@FreeBSD.ORG Sun Mar 2 02:41:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 821FB39B; Sun, 2 Mar 2014 02:41:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6DBA510F8; Sun, 2 Mar 2014 02:41:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s222fYVc003864; Sun, 2 Mar 2014 02:41:34 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s222fYnB003863; Sun, 2 Mar 2014 02:41:34 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201403020241.s222fYnB003863@svn.freebsd.org> From: Xin LI Date: Sun, 2 Mar 2014 02:41:34 +0000 (UTC) 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 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Mar 2014 02:41:34 -0000 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);