]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/async/ProtocolV2: fix write_lock usage around AckFrame
authorSage Weil <sage@redhat.com>
Tue, 5 Feb 2019 16:32:05 +0000 (10:32 -0600)
committerSage Weil <sage@redhat.com>
Thu, 7 Feb 2019 18:10:34 +0000 (12:10 -0600)
If we are calling _try_send or touching outcoming_bl we must be holding
write_lock.

Signed-off-by: Sage Weil <sage@redhat.com>
src/msg/async/ProtocolV2.cc

index f36e85511e1b7d0de4d38f89ddd95d2c40dd91dd..17320ea9ab73a5a75da5a4e141e178adae3ff34f 100644 (file)
@@ -985,7 +985,6 @@ void ProtocolV2::write_event() {
       } else if (r > 0)
         break;
     } while (can_write);
-    connection->write_lock.unlock();
 
     // if r > 0 mean data still lefted, so no need _try_send.
     if (r == 0) {
@@ -1004,6 +1003,7 @@ void ProtocolV2::write_event() {
         r = connection->_try_send();
       }
     }
+    connection->write_lock.unlock();
 
     connection->logger->tinc(l_msgr_running_send_time,
                              ceph::mono_clock::now() - start);