If an AioCompletion is being completed for an external API user, ensure
that the completion of image dispatcher finalizer does not race with the
potential to close the image.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
notify_callbacks_complete();
}
- if (image_dispatcher_ctx != nullptr) {
- image_dispatcher_ctx->complete(rval);
- }
-
tracepoint(librbd, aio_complete_exit);
}
cond.notify_all();
}
+ if (image_dispatcher_ctx != nullptr) {
+ image_dispatcher_ctx->complete(rval);
+ }
+
// note: possible for image to be closed after op marked finished
if (async_op.started()) {
async_op.finish_op();