diff options
author | avg <avg@FreeBSD.org> | 2012-10-06 19:52:50 +0000 |
---|---|---|
committer | avg <avg@FreeBSD.org> | 2012-10-06 19:52:50 +0000 |
commit | da6a14b6d98952a1ebe93314410668a3edc53261 (patch) | |
tree | 588240e918b0c2eee7e35d2593ba50ea4ab2282a | |
parent | 7e3795ec58e243325a130b2d352a9d7ae132e3e9 (diff) | |
download | FreeBSD-src-da6a14b6d98952a1ebe93314410668a3edc53261.zip FreeBSD-src-da6a14b6d98952a1ebe93314410668a3edc53261.tar.gz |
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
-rw-r--r-- | sys/geom/part/g_part.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/geom/part/g_part.c b/sys/geom/part/g_part.c index 859b2f1..e2ba79e 100644 --- a/sys/geom/part/g_part.c +++ b/sys/geom/part/g_part.c @@ -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); } |