]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
geom_slice: do not destroy softc until providers are gone
authorAndriy Gapon <avg@FreeBSD.org>
Tue, 31 Oct 2017 10:10:13 +0000 (10:10 +0000)
committerAndriy Gapon <avg@FreeBSD.org>
Tue, 31 Oct 2017 10:10:13 +0000 (10:10 +0000)
commit9662d80af53c15249c452123ef5296d86eae2df3
treea1884ae808fb936ac5e778f29bd0eb9de8d22c07
parent896b68b9361f8f244e1fc417140a8eeb5cc1c562
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
sys/geom/geom_slice.c