]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix another repop->ctx->op deref
authorSage Weil <sage@newdream.net>
Thu, 2 Feb 2012 23:20:14 +0000 (15:20 -0800)
committerSage Weil <sage@newdream.net>
Thu, 2 Feb 2012 23:20:14 +0000 (15:20 -0800)
Ok this time I actually looked for more and didn't see any.

Signed-off-by: Sage Weil <sage@newdream.net>
src/osd/ReplicatedPG.cc

index 825fdad8df6cbded38d7a52fd497b7ba6257ed33..b26ce770b0ab060f59712b909ccf9862c5033d70 100644 (file)
@@ -3156,7 +3156,10 @@ void ReplicatedPG::remove_repop(RepGather *repop)
 void ReplicatedPG::repop_ack(RepGather *repop, int result, int ack_type,
                             int fromosd, eversion_t peer_lcod)
 {
-  MOSDOp *m = (MOSDOp *)repop->ctx->op->request;
+  MOSDOp *m = NULL;
+
+  if (repop->ctx->op)
+    m = (MOSDOp *)repop->ctx->op->request;
 
   if (m)
     dout(7) << "repop_ack rep_tid " << repop->rep_tid << " op " << *m