From: Sage Weil Date: Mon, 17 Jun 2013 20:32:07 +0000 (-0700) Subject: msgr: clear con->pipe inside pipe_lock on mark_down X-Git-Tag: v0.61.8~23^2~19 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8612e50fd70bfceebd6c291e6cab10d9dfd39e8c;p=ceph.git msgr: clear con->pipe inside pipe_lock on mark_down We need to do this under protection of the pipe_lock. Signed-off-by: Sage Weil (cherry picked from commit afafb87e8402242d3897069f4b94ba46ffe0c413) --- diff --git a/src/msg/SimpleMessenger.cc b/src/msg/SimpleMessenger.cc index dd6b1bd944b..04b364c3ded 100644 --- a/src/msg/SimpleMessenger.cc +++ b/src/msg/SimpleMessenger.cc @@ -578,6 +578,11 @@ void SimpleMessenger::mark_down(const entity_addr_t& addr) p->unregister_pipe(); p->pipe_lock.Lock(); p->stop(); + if (p->connection_state) { + // do not generate a reset event for the caller in this case, + // since they asked for it. + p->connection_state->clear_pipe(p); + } p->pipe_lock.Unlock(); } else { ldout(cct,1) << "mark_down " << addr << " -- pipe dne" << dendl; @@ -597,6 +602,11 @@ void SimpleMessenger::mark_down(Connection *con) p->unregister_pipe(); p->pipe_lock.Lock(); p->stop(); + if (p->connection_state) { + // do not generate a reset event for the caller in this case, + // since they asked for it. + p->connection_state->clear_pipe(p); + } p->pipe_lock.Unlock(); p->put(); } else {