diff options
author | Sage Weil <sage@inktank.com> | 2013-07-16 13:01:18 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-07-24 16:20:36 -0700 |
commit | 07b9ebf4212d53606ce332ff927a2ff68ed26978 (patch) | |
tree | 8d372f43b6697fcc0eaf0280d80e41b70b596089 | |
parent | ae85a0a101d624363fe761c06ecd52d3d38ba4a2 (diff) | |
download | ceph-07b9ebf4212d53606ce332ff927a2ff68ed26978.tar.gz |
msg/Pipe: unlock msgr->lock earlier in accept()
Small cleanup. Nothing needs msgr->lock for the previously larger
window.
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit ad548e72fd94b4a16717abd3b3f1d1be4a3476cf)
-rw-r--r-- | src/msg/Pipe.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/msg/Pipe.cc b/src/msg/Pipe.cc index ad7ee49d2fb..d2bb5141294 100644 --- a/src/msg/Pipe.cc +++ b/src/msg/Pipe.cc @@ -341,13 +341,13 @@ int Pipe::accept() memset(&reply, 0, sizeof(reply)); reply.protocol_version = msgr->get_proto_version(peer_type, false); + msgr->lock.Unlock(); // mismatch? ldout(msgr->cct,10) << "accept my proto " << reply.protocol_version << ", their proto " << connect.protocol_version << dendl; if (connect.protocol_version != reply.protocol_version) { reply.tag = CEPH_MSGR_TAG_BADPROTOVER; - msgr->lock.Unlock(); goto reply; } @@ -373,12 +373,9 @@ int Pipe::accept() if (feat_missing) { ldout(msgr->cct,1) << "peer missing required features " << std::hex << feat_missing << std::dec << dendl; reply.tag = CEPH_MSGR_TAG_FEATURES; - msgr->lock.Unlock(); goto reply; } - msgr->lock.Unlock(); - // Check the authorizer. If not good, bail out. if (!msgr->verify_authorizer(connection_state, peer_type, connect.authorizer_protocol, authorizer, |