svn commit: r223900 - in head/sys: geom ufs/ffs

Pawel Jakub Dawidek pjd at FreeBSD.org
Mon Jul 11 09:00:16 UTC 2011


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 = g_access(ump->um_cp, 0, -1,
> % +			    (mp->mnt_flag & MNT_ROOTFS) ? -1 : 0);
> 
> This might be the fix.
> 
> %  			g_topology_unlock();
> %  			PICKUP_GIANT();
> % +			if (error)
> % +				return (error);
> % +
> 
> 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 = pp->geom->access(pp, dcr, dcw, dce);
	KASSERT(dcr > 0 || dcw > 0 || dce > 0 || error == 0,
	    ("Geom provider %s::%s failed closing ->access()",
	    pp->geom->class->name, pp->name));

-- 
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://yomoli.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-head/attachments/20110711/1e96331f/attachment.pgp


More information about the svn-src-head mailing list