Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Oct 2012 19:52:50 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r241296 - head/sys/geom/part
Message-ID:  <201210061952.q96Jqo3D029407@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Sat Oct  6 19:52:50 2012
New Revision: 241296
URL: http://svn.freebsd.org/changeset/base/241296

Log:
  g_part_taste: directly destroy consumer and geom here, no need for withering
  
  Besides withered but still alive consumers may interfere with
  re-tatsing.
  
  MFC after:	16 days

Modified:
  head/sys/geom/part/g_part.c

Modified: head/sys/geom/part/g_part.c
==============================================================================
--- head/sys/geom/part/g_part.c	Sat Oct  6 19:50:23 2012	(r241295)
+++ head/sys/geom/part/g_part.c	Sat Oct  6 19:52:50 2012	(r241296)
@@ -1880,7 +1880,10 @@ g_part_taste(struct g_class *mp, struct 
 	if (error == 0)
 		error = g_access(cp, 1, 0, 0);
 	if (error != 0) {
-		g_part_wither(gp, error);
+		if (cp->provider)
+			g_detach(cp);
+		g_destroy_consumer(cp);
+		g_destroy_geom(gp);
 		return (NULL);
 	}
 
@@ -1940,7 +1943,9 @@ g_part_taste(struct g_class *mp, struct 
 	g_topology_lock();
 	root_mount_rel(rht);
 	g_access(cp, -1, 0, 0);
-	g_part_wither(gp, error);
+	g_detach(cp);
+	g_destroy_consumer(cp);
+	g_destroy_geom(gp);
 	return (NULL);
 }
 



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