]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: avoid possible recursive lock when racing acquire lock 12991/head
authorJason Dillaman <dillaman@redhat.com>
Thu, 19 Jan 2017 01:54:22 +0000 (20:54 -0500)
committerJason Dillaman <dillaman@redhat.com>
Thu, 19 Jan 2017 01:54:22 +0000 (20:54 -0500)
Fixes: http://tracker.ceph.com/issues/17447
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/Operations.cc

index 1c1aa38a332d37c5c2d2989c604cb35210c4b785..a3a828e0fa449acd94f24c9999e93878c9eba132 100644 (file)
@@ -203,10 +203,10 @@ struct C_InvokeAsyncRequest : public Context {
     CephContext *cct = image_ctx.cct;
     ldout(cct, 20) << __func__ << dendl;
 
-    Context *ctx = util::create_context_callback<
-      C_InvokeAsyncRequest<I>,
-      &C_InvokeAsyncRequest<I>::handle_acquire_exclusive_lock>(
-        this);
+    Context *ctx = util::create_async_context_callback(
+      image_ctx, util::create_context_callback<
+        C_InvokeAsyncRequest<I>,
+        &C_InvokeAsyncRequest<I>::handle_acquire_exclusive_lock>(this));
 
     if (request_lock) {
       // current lock owner doesn't support op -- try to perform