]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: fix lockdep issue when duplicate event detected 9819/head
authorJason Dillaman <dillaman@redhat.com>
Mon, 20 Jun 2016 14:32:04 +0000 (10:32 -0400)
committerJason Dillaman <dillaman@redhat.com>
Mon, 20 Jun 2016 14:32:04 +0000 (10:32 -0400)
Fixes: http://tracker.ceph.com/issues/16363
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/journal/Replay.cc

index 8576e2ab3c236ded4ebabafa2cca1eb745a5dcea..58d5dcd1be3ed23ac9e0765a85ea8b6ab694ed94 100644 (file)
@@ -735,8 +735,11 @@ Context *Replay<I>::create_op_context_callback(uint64_t op_tid,
   assert(m_lock.is_locked());
   if (m_op_events.count(op_tid) != 0) {
     lderr(cct) << "duplicate op tid detected: " << op_tid << dendl;
+
+    // on_ready is already async but on failure invoke on_safe async
+    // as well
     on_ready->complete(0);
-    on_safe->complete(-EINVAL);
+    m_image_ctx.op_work_queue->queue(on_safe, -EINVAL);
     return nullptr;
   }