svn commit: r211390 - stable/8/sys/geom/part

Andrey V. Elsukov ae at FreeBSD.org
Mon Aug 16 08:48:39 UTC 2010


Author: ae
Date: Mon Aug 16 08:48:39 2010
New Revision: 211390
URL: http://svn.freebsd.org/changeset/base/211390

Log:
  MFC r210746:
    Release access for consumers that are opened, but will be destroyed
    indirectly by orphan method.
  
    PR:		148688
  
  MFC r210792:
    Check that table is not NULL before access, it can be NULL
    for some cases.
  
  Approved by: kib (mentor)

Modified:
  stable/8/sys/geom/part/g_part.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cam/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/geom/part/g_part.c
==============================================================================
--- stable/8/sys/geom/part/g_part.c	Mon Aug 16 04:22:29 2010	(r211389)
+++ stable/8/sys/geom/part/g_part.c	Mon Aug 16 08:48:39 2010	(r211390)
@@ -1738,6 +1738,7 @@ static void
 g_part_orphan(struct g_consumer *cp)
 {
 	struct g_provider *pp;
+	struct g_part_table *table;
 
 	pp = cp->provider;
 	KASSERT(pp != NULL, (__func__));
@@ -1745,6 +1746,9 @@ g_part_orphan(struct g_consumer *cp)
 	g_topology_assert();
 
 	KASSERT(pp->error != 0, (__func__));
+	table = cp->geom->softc;
+	if (table != NULL && table->gpt_opened)
+		g_access(cp, -1, -1, -1);
 	g_part_wither(cp->geom, pp->error);
 }
 


More information about the svn-src-all mailing list