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.66~32^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=afafb87e8402242d3897069f4b94ba46ffe0c413;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 --- diff --git a/src/msg/SimpleMessenger.cc b/src/msg/SimpleMessenger.cc index 994f849c1eb..2bee4d6370d 100644 --- a/src/msg/SimpleMessenger.cc +++ b/src/msg/SimpleMessenger.cc @@ -579,6 +579,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; @@ -598,6 +603,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 {