]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: use stop_block() if the object is blocked
authormyoungwon oh <omwmw@sk.com>
Thu, 7 Dec 2017 07:32:32 +0000 (16:32 +0900)
committermyoungwon oh <omwmw@sk.com>
Sun, 7 Jan 2018 13:42:19 +0000 (22:42 +0900)
This commit prevents double free in finish_flush()
(stop_block() -> cancel_flush())

Signed-off-by: Myoungwon Oh <omwmw@sk.com>
src/osd/PrimaryLogPG.cc

index 32f542fe56af1a82f7adbeab06eea3d9c54bc344..76ccae05a668f65fe0781fa2c517f8122876ecbf 100644 (file)
@@ -9851,7 +9851,7 @@ void PrimaryLogPG::cancel_flush(FlushOpRef fop, bool requeue)
       p.second = 0;
     } 
   }
-  if (fop->blocking) {
+  if (fop->blocking && fop->obc->is_blocked()) {
     fop->obc->stop_block();
     kick_object_context_blocked(fop->obc);
   }