mongodb/mongo — pull request #760 by siying (2014-08-28 00:27:38+00:00)
Title: SERVER-15057: fix one potential deadlock in rocks storage when dropping ...

A potential deadlock is possible in RocksEngine::dropCollection(), when trying to acquire _entryMapMutex the second time. Here is an example call stack:
...
#7 mongo::RocksEngine::getIndexColumnFamily at src/mongo/db/storage/rocks/rocks_engine.cpp:224
#8 mongo::RocksCollectionCatalogEntry::removeIndex at src/mongo/db/storage/rocks/rocks_collection_catalog_entry.cpp:121
#9 mongo::RocksEngine::_dropCollection_inlock at src/mongo/db/storage/rocks/rocks_engine.cpp:348
#10 mongo::RocksEngine::dropDatabase at src/mongo/db/storage/rocks/rocks_engine.cpp:188
...

Fix it by avoid holding any _entryMapMutex inside RocksEngine::dropCollection().