diff --git a/sys/geom/geom_flashmap.c b/sys/geom/geom_flashmap.c index b7737b5c9a14..fff96c19fdfd 100644 --- a/sys/geom/geom_flashmap.c +++ b/sys/geom/geom_flashmap.c @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -230,10 +231,12 @@ g_flashmap_load(device_t dev, struct g_provider *pp, flash_slicer_t slicer, void flash_register_slicer(flash_slicer_t slicer, u_int type, bool force) { + DROP_GIANT(); g_topology_lock(); if (g_flashmap_slicers[type].slicer == NULL || force == TRUE) g_flashmap_slicers[type].slicer = slicer; g_topology_unlock(); + PICKUP_GIANT(); } static struct g_class g_flashmap_class = {