From: Jason Dillaman Date: Mon, 20 Jun 2016 14:32:04 +0000 (-0400) Subject: librbd: fix lockdep issue when duplicate event detected X-Git-Tag: v10.2.3~87^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6a28d63ac609c4e3eb43a31cabe36f2c79c875d2;p=ceph.git librbd: fix lockdep issue when duplicate event detected Fixes: http://tracker.ceph.com/issues/16363 Signed-off-by: Jason Dillaman (cherry picked from commit 86ef725c34ae950c0e41e89c1aa0c6a15e40f369) --- diff --git a/src/librbd/journal/Replay.cc b/src/librbd/journal/Replay.cc index c57202a0ba31..3c3bc74aee4d 100644 --- a/src/librbd/journal/Replay.cc +++ b/src/librbd/journal/Replay.cc @@ -708,8 +708,11 @@ Context *Replay::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; }