]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msgr: Unlock dispatch_queue.lock when short-circuiting queue_received.
authorGreg Farnum <gregf@hq.newdream.net>
Mon, 3 Jan 2011 22:14:00 +0000 (14:14 -0800)
committerGreg Farnum <gregf@hq.newdream.net>
Mon, 3 Jan 2011 22:15:24 +0000 (14:15 -0800)
Previously we left the mutex locked, which is obviously bad bad bad!
I believe this was the cause of #673.

Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
src/msg/SimpleMessenger.cc

index fd18a5461611efe9091269820286738f234f2e73..0d9281bcbe4ef1feb519666ec0ca72fc24dc9b8f 100644 (file)
@@ -551,8 +551,10 @@ void SimpleMessenger::Pipe::queue_received(Message *m, int priority)
     messenger->dispatch_queue.lock.Lock();
     pipe_lock.Lock();
     
-    if (halt_delivery)
+    if (halt_delivery) {
+      messenger->dispatch_queue.lock.Unlock();
       goto halt;
+    }
     
     dout(20) << "queue_received queuing pipe" << dendl;
     if (!queue_items.count(priority))