Use the topology lock to protect list of providers while withering them.
It is possible that provider is destroyed while we are iterating over the list. Reported by: Brian Parkison <parkison@panzura.com> Discussed with: phk MFC after: 1 week
This commit is contained in:
parent
5677eef9a7
commit
171f6b3a34
@ -635,10 +635,13 @@ disk_gone(struct disk *dp)
|
||||
struct g_geom *gp;
|
||||
struct g_provider *pp;
|
||||
|
||||
g_topology_lock();
|
||||
gp = dp->d_geom;
|
||||
if (gp != NULL)
|
||||
if (gp != NULL) {
|
||||
LIST_FOREACH(pp, &gp->provider, provider)
|
||||
g_wither_provider(pp, ENXIO);
|
||||
}
|
||||
g_topology_unlock();
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
x
Reference in New Issue
Block a user