diff --git a/src/librbd/io/AioCompletion.cc b/src/librbd/io/AioCompletion.cc index a50677215818b..9e1d1e18fe7a3 100644 --- a/src/librbd/io/AioCompletion.cc +++ b/src/librbd/io/AioCompletion.cc @@ -157,10 +157,9 @@ void AioCompletion::queue_complete() { add_request(); // ensure completion fires in clean lock context - boost::asio::post(*ictx->asio_engine, boost::asio::bind_executor( - ictx->asio_engine->get_api_strand(), [this]() { + boost::asio::post(ictx->asio_engine->get_api_strand(), [this]() { complete_request(0); - })); + }); } void AioCompletion::block(CephContext* cct) { @@ -261,12 +260,11 @@ void AioCompletion::complete_external_callback() { // ensure librbd external users never experience concurrent callbacks // from multiple librbd-internal threads. - boost::asio::dispatch(*ictx->asio_engine, boost::asio::bind_executor( - ictx->asio_engine->get_api_strand(), [this]() { + boost::asio::dispatch(ictx->asio_engine->get_api_strand(), [this]() { complete_cb(rbd_comp, complete_arg); complete_event_socket(); put(); - })); + }); } void AioCompletion::complete_event_socket() {