From 59802c5255c17ff5715a53c7f57a41ea7413db4c Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Fri, 2 Mar 2018 09:41:06 -0500 Subject: [PATCH] librbd: avoid potential for lock inversion in journal IO replay If an IO replay immediately fails due to a image shrink applied after the IO, the lock order will be incorrect. Signed-off-by: Jason Dillaman --- src/librbd/journal/Replay.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librbd/journal/Replay.cc b/src/librbd/journal/Replay.cc index da91f28bc0d..2f33ab5e915 100644 --- a/src/librbd/journal/Replay.cc +++ b/src/librbd/journal/Replay.cc @@ -884,7 +884,7 @@ void Replay::handle_aio_modify_complete(Context *on_ready, Context *on_safe, if (r < 0) { lderr(cct) << ": AIO modify op failed: " << cpp_strerror(r) << dendl; - on_safe->complete(r); + m_image_ctx.op_work_queue->queue(on_safe, r); return; } -- 2.39.5