From: Mykola Golub Date: Wed, 24 Jul 2019 12:35:01 +0000 (+0100) Subject: librbd: don't use complete_external_callback if ImageCtx destroyed X-Git-Tag: v15.1.0~2094^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F29263%2Fhead;p=ceph.git 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 --- diff --git a/src/librbd/io/AioCompletion.cc b/src/librbd/io/AioCompletion.cc index 44ad7b72fdb0..603c1f18fb1a 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;