]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: potential deadlock closing image with in-flight readahead 11152/head
authorJason Dillaman <dillaman@redhat.com>
Tue, 20 Sep 2016 14:19:45 +0000 (10:19 -0400)
committerJason Dillaman <dillaman@redhat.com>
Tue, 20 Sep 2016 14:19:45 +0000 (10:19 -0400)
Fixes: http://tracker.ceph.com/issues/17198
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/image/CloseRequest.cc

index 4ee52a5872492c5e92f4bc279c2252e71e2f81f6..fe87f9a6f016efa2462fba31b5b0087ec808137f 100644 (file)
@@ -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>