HomeFreeBSD

geom_slice: do not destroy softc until providers are gone

Description

geom_slice: do not destroy softc until providers are gone

At present, g_slice_orphan and g_slice_spoiled destroy the softc
(struct g_slicer) even before calling g_wither_geom, so there can
be active and incoming io requests at that time and g_slice_start
can access the softc.

This commit changes the code to destroy the softc only after all
providers are closed.

While there, a couple of small cleanups.

Reported by: Ben RUBSON <ben.rubson@gmail.com>
Tested by: Ben RUBSON <ben.rubson@gmail.com>
Reviewed by: mav, smh (earlier version)
MFC after: 2 weeks
Sponsored by: Panzura
Differential Revision: https://reviews.freebsd.org/D12809

Details

Provenance
avgAuthored on
Reviewer
mav
Differential Revision
D12809: geom_slice: do not destroy softc until providers are gone
Parents
rS325226: MFC r324957: iscsi_shutdown_post: do nothing if panic-ing
Branches
Unknown
Tags
Unknown