From: David Zafman Date: Mon, 17 Mar 2014 22:48:36 +0000 (-0700) Subject: osd: Error from start_flush() not checked in agent_maybe_flush() X-Git-Tag: v0.80-rc1~93^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bf8756292673298b5414ae26d4e2ef1eac089859;p=ceph.git osd: Error from start_flush() not checked in agent_maybe_flush() This caused a very minor memory leak since ctx was allocated Include logging of l_osd_agent_skip Signed-off-by: David Zafman --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index bad01e8cf98..8a822fdf065 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -10760,7 +10760,15 @@ bool ReplicatedPG::agent_maybe_flush(ObjectContextRef& obc) ctx->at_version = get_next_version(); ctx->on_finish = new C_AgentFlushStartStop(this, obc->obs.oi.soid); - start_flush(ctx, false); + int result = start_flush(ctx, false); + if (result != -EINPROGRESS) { + dout(10) << __func__ << " start_flush() failed " << obc->obs.oi + << " with " << result << dendl; + osd->logger->inc(l_osd_agent_skip); + if (result != -ECANCELED) + close_op_ctx(ctx, result); + return false; + } osd->logger->inc(l_osd_agent_flush); return true;