From 634634fd8f9ebba75dfc9151ade5b4f91553c112 Mon Sep 17 00:00:00 2001 From: Mykola Golub Date: Wed, 24 Jul 2019 13:35:01 +0100 Subject: [PATCH] librbd: don't use complete_external_callback if ImageCtx destroyed complete_external_callback (which requires ImageCtx) is used to prevent concurrent callbacks, and not needed in this particular case. Signed-off-by: Mykola Golub --- src/librbd/io/AioCompletion.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/librbd/io/AioCompletion.cc b/src/librbd/io/AioCompletion.cc index 44ad7b72fdb..603c1f18fb1 100644 --- a/src/librbd/io/AioCompletion.cc +++ b/src/librbd/io/AioCompletion.cc @@ -95,6 +95,7 @@ void AioCompletion::complete() { // must destroy ImageCtx prior to invoking callback delete ictx; ictx = nullptr; + external_callback = false; } state = AIO_STATE_CALLBACK;