From: Jason Dillaman Date: Tue, 20 Sep 2016 14:19:45 +0000 (-0400) Subject: librbd: potential deadlock closing image with in-flight readahead X-Git-Tag: v11.0.1~133^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c971d58f8a5550b19374b74bb89d69143423479b;p=ceph.git librbd: potential deadlock closing image with in-flight readahead Fixes: http://tracker.ceph.com/issues/17198 Signed-off-by: Jason Dillaman --- diff --git a/src/librbd/image/CloseRequest.cc b/src/librbd/image/CloseRequest.cc index 4ee52a58724..fe87f9a6f01 100644 --- a/src/librbd/image/CloseRequest.cc +++ b/src/librbd/image/CloseRequest.cc @@ -186,8 +186,9 @@ void CloseRequest::send_flush_readahead() { CephContext *cct = m_image_ctx->cct; ldout(cct, 10) << this << " " << __func__ << dendl; - m_image_ctx->readahead.wait_for_pending(create_context_callback< - CloseRequest, &CloseRequest::handle_flush_readahead>(this)); + m_image_ctx->readahead.wait_for_pending(create_async_context_callback( + *m_image_ctx, create_context_callback< + CloseRequest, &CloseRequest::handle_flush_readahead>(this))); } template