Before calling g_orphan_provider(), add G_PF_WITHER flag, so GEOM will know

to destroy it.

PR:		kern/81758
Submitted by:	trasz <trasz@buziaczek.pl>
MFC after:	3 days
This commit is contained in:
Pawel Jakub Dawidek 2005-07-17 13:15:02 +00:00
parent ed2fc9673b
commit 0499edf459
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=148092
2 changed files with 2 additions and 0 deletions

View File

@ -124,6 +124,7 @@ g_concat_remove_disk(struct g_concat_disk *disk)
disk->d_consumer = NULL;
if (sc->sc_provider != NULL) {
sc->sc_provider->flags |= G_PF_WITHER;
g_orphan_provider(sc->sc_provider, ENXIO);
sc->sc_provider = NULL;
G_CONCAT_DEBUG(0, "Device %s removed.", sc->sc_name);

View File

@ -171,6 +171,7 @@ g_stripe_remove_disk(struct g_consumer *cp)
sc->sc_disks[no] = NULL;
if (sc->sc_provider != NULL) {
sc->sc_provider->flags |= G_PF_WITHER;
g_orphan_provider(sc->sc_provider, ENXIO);
sc->sc_provider = NULL;
G_STRIPE_DEBUG(0, "Device %s removed.", sc->sc_name);