]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PrimaryLogPG: issue_repop: drop obsolete condition on head_obc
authorSage Weil <sage@redhat.com>
Fri, 1 Sep 2017 16:15:08 +0000 (12:15 -0400)
committerSage Weil <sage@redhat.com>
Thu, 21 Sep 2017 18:29:32 +0000 (14:29 -0400)
The only user is trim_object, which sets obc = clone, head_obc =
head.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PrimaryLogPG.cc

index 623d8620b0760aa6b9c64d86456d71077dd16567..60b64e3bf97b4532892198808c5a6e5f213eacd2 100644 (file)
@@ -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;