When we are signaling the cond to indicate that a notify is complete,
take the appropriate lock. This removes the possibility of a race
that loses our signal. (That would be very difficult given that there
are network round trips involved, but this makes the lock/cond usage
"correct.")
Signed-off-by: Sage Weil <sage@inktank.com>
uint64_t ver,
bufferlist& bl)
{
+ lock->Lock();
*done = true;
cond->Signal();
+ lock->Unlock();
}
/////////////////////////// WatchContext ///////////////////////////////