0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

fix assert in releaseAndWriteLock

This commit is contained in:
Eliot Horowitz 2009-12-06 10:06:02 -05:00
parent 130bfc3af7
commit 241a046b0e

View File

@ -120,15 +120,16 @@ namespace mongo {
/* this unlocks, does NOT upgrade. that works for our current usage */
inline void mongolock::releaseAndWriteLock() {
if( !_writelock ) {
#if BOOST_VERSION >= 103500
int s = dbMutex.getState();
if( s != -1 ) {
log() << "error: releaseAndWriteLock() s == " << s << endl;
msgasserted( "releaseAndWriteLock: unlock_shared failed, probably recursive" );
}
int s = dbMutex.getState();
if( s != -1 ) {
log() << "error: releaseAndWriteLock() s == " << s << endl;
msgasserted( "releaseAndWriteLock: unlock_shared failed, probably recursive" );
}
#endif
if( !_writelock ) {
_writelock = true;
dbMutex.unlock_shared();
dbMutex.lock();