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
This commit is contained in:
Andriy Gapon 2012-10-06 19:52:50 +00:00
parent 298fbd1605
commit a90c9dfeab
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=241296

View file

@ -1880,7 +1880,10 @@ g_part_taste(struct g_class *mp, struct g_provider *pp, int flags __unused)
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_provider *pp, int flags __unused)
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);
}