Skip to content

Commit

Permalink
Merge pull request #11152 from dillaman/wip-17198
Browse files Browse the repository at this point in the history
librbd: potential deadlock closing image with in-flight readahead

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
  • Loading branch information
Mykola Golub committed Sep 22, 2016
2 parents 1f09557 + c971d58 commit ff7fda4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/librbd/image/CloseRequest.cc
Expand Up @@ -186,8 +186,9 @@ void CloseRequest<I>::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<I>, &CloseRequest<I>::handle_flush_readahead>(this));
m_image_ctx->readahead.wait_for_pending(create_async_context_callback(
*m_image_ctx, create_context_callback<
CloseRequest<I>, &CloseRequest<I>::handle_flush_readahead>(this)));
}

template <typename I>
Expand Down

0 comments on commit ff7fda4

Please sign in to comment.