Index: sys/geom/geom_bsd.c =================================================================== RCS file: /home/ncvs/src/sys/geom/geom_bsd.c,v retrieving revision 1.78 diff -u -r1.78 geom_bsd.c --- sys/geom/geom_bsd.c 24 May 2006 11:02:32 -0000 1.78 +++ sys/geom/geom_bsd.c 27 Jul 2007 10:34:49 -0000 @@ -201,6 +201,8 @@ struct disklabel *dl; off_t secoff; + g_topology_assert_not(); + /* * We need to read entire aligned sectors, and we assume that the * disklabel does not span sectors, so one sector is enough. @@ -502,6 +504,7 @@ * using a simple "break". This improves code clarity without * ending up in deep nesting and without using goto or come from. */ + g_topology_unlock(); do { /* * If the provider is an MBR we will only auto attach @@ -571,8 +574,11 @@ * Process the found disklabel, and modify our "slice" * instance to match it, if possible. */ + g_topology_lock(); error = g_bsd_modify(gp, ms->label); + g_topology_unlock(); } while (0); + g_topology_lock(); /* Success or failure, we can close our provider now. */ g_access(cp, -1, 0, 0);