Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Jul 2011 10:59:53 +0200
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Bruce Evans <brde@optusnet.com.au>
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Kirk McKusick <mckusick@FreeBSD.org>
Subject:   Re: svn commit: r223900 - in head/sys: geom ufs/ffs
Message-ID:  <20110711085953.GA1675@garage.freebsd.pl>
In-Reply-To: <20110710114730.T1039@besplex.bde.org>
References:  <201107100041.p6A0fVea022978@svn.freebsd.org> <20110710114730.T1039@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help

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



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