[Midnightbsd-cvs] src [8290] trunk/sys/geom/part/g_part.c: g_part_tase: directly destroy consumer and geom here

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sat Sep 17 18:08:47 EDT 2016


Revision: 8290
          http://svnweb.midnightbsd.org/src/?rev=8290
Author:   laffer1
Date:     2016-09-17 18:08:46 -0400 (Sat, 17 Sep 2016)
Log Message:
-----------
g_part_tase: directly destroy consumer and geom here

Modified Paths:
--------------
    trunk/sys/geom/part/g_part.c

Modified: trunk/sys/geom/part/g_part.c
===================================================================
--- trunk/sys/geom/part/g_part.c	2016-09-17 22:08:21 UTC (rev 8289)
+++ trunk/sys/geom/part/g_part.c	2016-09-17 22:08:46 UTC (rev 8290)
@@ -1881,7 +1881,10 @@
 	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);
 	}
 
@@ -1941,7 +1944,9 @@
 	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);
 }
 



More information about the Midnightbsd-cvs mailing list