]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Unlock osd_lock in _dispatch before locking handle_map_lock
authorGreg Farnum <gregf@hq.newdream.net>
Tue, 3 Aug 2010 22:21:42 +0000 (15:21 -0700)
committerGreg Farnum <gregf@hq.newdream.net>
Tue, 3 Aug 2010 22:21:42 +0000 (15:21 -0700)
src/osd/OSD.cc

index c52a8b713f055b0522c74417af970c9ca0c29fe0..aaec8bc2f1603ebdacfc0cc81c98636c730f2737 100644 (file)
@@ -1946,6 +1946,7 @@ void OSD::_dispatch(Message *m)
   Session *session = NULL;
 
   if (handle_map_lock) { //can't dispatch while map is being updated!
+    osd_lock.Unlock();
     handle_map_lock->Lock();
     if (map_in_progress) {
       dout(25) << "waiting for handle_osd_map to complete before dispatching" << dendl;
@@ -1953,6 +1954,7 @@ void OSD::_dispatch(Message *m)
         map_cond.Wait(*handle_map_lock);
     }
     handle_map_lock->Unlock();
+    osd_lock.Lock();
   }
 
   switch (m->get_type()) {