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: v10.2.4~30^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F11463%2Fhead;p=ceph.git librbd: potential deadlock closing image with in-flight readahead Fixes: http://tracker.ceph.com/issues/17198 Signed-off-by: Jason Dillaman (cherry picked from commit c971d58f8a5550b19374b74bb89d69143423479b) --- diff --git a/src/librbd/image/CloseRequest.cc b/src/librbd/image/CloseRequest.cc index 4ee52a587249..fe87f9a6f016 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