]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Remove the topology lock from disk_gone(), it might be called with regular
authorpjd <pjd@FreeBSD.org>
Fri, 28 Sep 2012 08:22:51 +0000 (08:22 +0000)
committerpjd <pjd@FreeBSD.org>
Fri, 28 Sep 2012 08:22:51 +0000 (08:22 +0000)
commit785571bd2b886e6694a7a9a08f7bdd6f1ce8ce7a
tree2d5e5641d50be7e9d56eaa3ecb82334faeb677a8
parenta93e845e54aef353af783f879e3482a9e473a572
Remove the topology lock from disk_gone(), it might be called with regular
mutexes held and the topology lock is an sx lock.

The topology lock was there to protect traversing through the list of providers
of disk's geom, but it seems that disk's geom has always exactly one provider.

Change the code to call g_wither_provider() for this one provider, which is
safe to do without holding the topology lock and assert that there is indeed
only one provider.

Discussed with: ken
MFC after: 1 week
sys/geom/geom_disk.c