Null out journal softc pointer earlier to avoid a segment fault
that can otherwise occur. PR: 221804 Submitted by: Andreas Longwitz <longwitz at incore.de> MFC after: 1 week
This commit is contained in:
parent
3678a5a2a6
commit
9e57d147a9
@ -2432,6 +2432,7 @@ g_journal_destroy(struct g_journal_softc *sc)
|
||||
sc->sc_current_count);
|
||||
}
|
||||
|
||||
gp->softc = NULL;
|
||||
LIST_FOREACH(cp, &gp->consumer, consumer) {
|
||||
if (cp->acr + cp->acw + cp->ace > 0)
|
||||
g_access(cp, -1, -1, -1);
|
||||
@ -2443,7 +2444,6 @@ g_journal_destroy(struct g_journal_softc *sc)
|
||||
*/
|
||||
g_post_event(g_journal_destroy_consumer, cp, M_WAITOK, NULL);
|
||||
}
|
||||
gp->softc = NULL;
|
||||
g_wither_geom(gp, ENXIO);
|
||||
free(sc, M_JOURNAL);
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user