From bd36330ff84a1d2dee8be8ba5a36d6242de67e06 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 1 Sep 2017 12:15:08 -0400 Subject: [PATCH] osd/PrimaryLogPG: issue_repop: drop obsolete condition on head_obc The only user is trim_object, which sets obc = clone, head_obc = head. Signed-off-by: Sage Weil --- src/osd/PrimaryLogPG.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 623d8620b07..60b64e3bf97 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -9100,16 +9100,13 @@ void PrimaryLogPG::issue_repop(RepGather *repop, OpContext *ctx) ctx->obc->ondisk_write_lock(); - bool unlock_head_obc = false; ctx->op_t->add_obc(ctx->obc); if (ctx->clone_obc) { ctx->clone_obc->ondisk_write_lock(); ctx->op_t->add_obc(ctx->clone_obc); } - if (ctx->head_obc && - ctx->head_obc->obs.oi.soid != ctx->obc->obs.oi.soid) { + if (ctx->head_obc) { ctx->head_obc->ondisk_write_lock(); - unlock_head_obc = true; ctx->op_t->add_obc(ctx->head_obc); } @@ -9118,7 +9115,7 @@ void PrimaryLogPG::issue_repop(RepGather *repop, OpContext *ctx) Context *onapplied_sync = new C_OSD_OndiskWriteUnlock( ctx->obc, ctx->clone_obc, - unlock_head_obc ? ctx->head_obc : ObjectContextRef()); + ctx->head_obc); if (!(ctx->log.empty())) { assert(ctx->at_version >= projected_last_update); projected_last_update = ctx->at_version; -- 2.39.5