From: Sage Weil Date: Tue, 5 Feb 2019 16:32:05 +0000 (-0600) Subject: msg/async/ProtocolV2: fix write_lock usage around AckFrame X-Git-Tag: v14.1.0~183^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5d84f119348f20aaed661b1e80f6ba402c10eb04;p=ceph.git msg/async/ProtocolV2: fix write_lock usage around AckFrame If we are calling _try_send or touching outcoming_bl we must be holding write_lock. Signed-off-by: Sage Weil --- diff --git a/src/msg/async/ProtocolV2.cc b/src/msg/async/ProtocolV2.cc index f36e85511e1b7..17320ea9ab73a 100644 --- a/src/msg/async/ProtocolV2.cc +++ b/src/msg/async/ProtocolV2.cc @@ -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);