Drop Giant lock before grabbing the topology lock.

This commit is contained in:
Pawel Jakub Dawidek 2004-11-09 00:35:08 +00:00
parent cf0c439f9d
commit fdc3c6ce23
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=137421
2 changed files with 4 additions and 0 deletions

View File

@ -2805,6 +2805,7 @@ g_mirror_shutdown(void *arg, int howto)
struct g_geom *gp, *gp2;
mp = arg;
DROP_GIANT();
g_topology_lock();
LIST_FOREACH_SAFE(gp, &mp->geom, geom, gp2) {
if (gp->softc == NULL)
@ -2812,6 +2813,7 @@ g_mirror_shutdown(void *arg, int howto)
g_mirror_destroy(gp->softc, 1);
}
g_topology_unlock();
PICKUP_GIANT();
#if 0
tsleep(&gp, PRIBIO, "m:shutdown", hz * 20);
#endif

View File

@ -3030,6 +3030,7 @@ g_raid3_shutdown(void *arg, int howto)
struct g_geom *gp, *gp2;
mp = arg;
DROP_GIANT();
g_topology_lock();
LIST_FOREACH_SAFE(gp, &mp->geom, geom, gp2) {
if (gp->softc == NULL)
@ -3037,6 +3038,7 @@ g_raid3_shutdown(void *arg, int howto)
g_raid3_destroy(gp->softc, 1);
}
g_topology_unlock();
PICKUP_GIANT();
#if 0
tsleep(&gp, PRIBIO, "r3:shutdown", hz * 20);
#endif