]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/Readahead: use correct lock when waiting on the pending ops 2893/head
authorJason Dillaman <dillaman@redhat.com>
Mon, 10 Nov 2014 21:08:05 +0000 (16:08 -0500)
committerJason Dillaman <dillaman@redhat.com>
Tue, 11 Nov 2014 00:57:08 +0000 (19:57 -0500)
Readahead was using the incorrect lock with the pending condition,
resulting in a failed assertion.  It now uses the lock associated
with pending ops.

Fixes: #10045
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/common/Readahead.cc

index fb53e5e9bac0c4321d58aa9e3de54ecb8b1086df..a3f5bfc7e4e74bee381ba005312b19697d8b02f5 100644 (file)
@@ -131,7 +131,7 @@ void Readahead::dec_pending(int count) {
 void Readahead::wait_for_pending() {
   m_pending_lock.Lock();
   while (m_pending > 0) {
-    m_pending_cond.Wait(m_lock);
+    m_pending_cond.Wait(m_pending_lock);
   }
   m_pending_lock.Unlock();
 }