Release access for consumers that are opened, but will be destroyed

indirectly by orphan method.

PR:		148688
Silence from:	marcel
Approved by:	mav (mentor)
MFC after: 	2 weeks
This commit is contained in:
Andrey V. Elsukov 2010-08-02 10:26:15 +00:00
parent d0a59d85df
commit b6d4028166

View File

@ -1739,6 +1739,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__));
@ -1746,6 +1747,9 @@ g_part_orphan(struct g_consumer *cp)
g_topology_assert();
KASSERT(pp->error != 0, (__func__));
table = cp->geom->softc;
if (table->gpt_opened)
g_access(cp, -1, -1, -1);
g_part_wither(cp->geom, pp->error);
}