]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/ReplicatedPG: Don't create objectcontext when remove tmp-obj for promote failed...
authorJianpeng Ma <jianpeng.ma@intel.com>
Fri, 20 Mar 2015 05:33:13 +0000 (13:33 +0800)
committerJianpeng Ma <jianpeng.ma@intel.com>
Tue, 9 Jun 2015 02:58:18 +0000 (10:58 +0800)
If on objectcontext for tmp-obj dosen't find, there must be a bug.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/osd/ReplicatedPG.cc

index 4b12bb9ba3b728f001da020e9dd091c4b560d70f..7bcce73ecaa907e3850c655b958fe08a9c8916d8 100644 (file)
@@ -6611,7 +6611,8 @@ void ReplicatedPG::finish_promote(int r, CopyResults *results,
 
   if (r < 0 && results->started_temp_obj) {
     dout(10) << __func__ << " abort; will clean up partial work" << dendl;
-    ObjectContextRef tempobc = get_object_context(results->temp_oid, true);
+    ObjectContextRef tempobc = get_object_context(results->temp_oid, false);
+    assert(tempobc);
     RepGather *repop = simple_repop_create(tempobc);
     repop->ctx->op_t->remove(results->temp_oid);
     simple_repop_submit(repop);