From owner-svn-src-all@FreeBSD.ORG Mon Jul 11 09:00:16 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A0AA106564A; Mon, 11 Jul 2011 09:00:12 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id C13CC8FC0A; Mon, 11 Jul 2011 09:00:11 +0000 (UTC) Received: from localhost (58.wheelsystems.com [83.12.187.58]) by mail.dawidek.net (Postfix) with ESMTPSA id 5BD102D6; Mon, 11 Jul 2011 10:59:58 +0200 (CEST) Date: Mon, 11 Jul 2011 10:59:53 +0200 From: Pawel Jakub Dawidek To: Bruce Evans Message-ID: <20110711085953.GA1675@garage.freebsd.pl> References: <201107100041.p6A0fVea022978@svn.freebsd.org> <20110710114730.T1039@besplex.bde.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FL5UXtIhxfXey3p5" Content-Disposition: inline In-Reply-To: <20110710114730.T1039@besplex.bde.org> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Kirk McKusick Subject: Re: svn commit: r223900 - in head/sys: geom ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 11 Jul 2011 09:00:16 -0000 --FL5UXtIhxfXey3p5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 10, 2011 at 01:30:05PM +1000, Bruce Evans wrote: > % DROP_GIANT(); > % g_topology_lock(); > % - g_access(ump->um_cp, 0, -1, 0); > % + error =3D g_access(ump->um_cp, 0, -1, > % + (mp->mnt_flag & MNT_ROOTFS) ? -1 : 0); >=20 > This might be the fix. >=20 > % g_topology_unlock(); > % PICKUP_GIANT(); > % + if (error) > % + return (error); > % + >=20 > Add missing error handling. g_access() can easily fail, although it > rarely fails in the above since the above asks for less access than > has already been granted. It never fails when you are closing. From g_access(): error =3D pp->geom->access(pp, dcr, dcw, dce); KASSERT(dcr > 0 || dcw > 0 || dce > 0 || error =3D=3D 0, ("Geom provider %s::%s failed closing ->access()", pp->geom->class->name, pp->name)); --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --FL5UXtIhxfXey3p5 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk4au4gACgkQForvXbEpPzTwSgCgglBysBQBFGzk0bkr9I7aZUpn VagAoIcw9NYarEp0uuvAno2/lcW8PnYi =odtJ -----END PGP SIGNATURE----- --FL5UXtIhxfXey3p5--