]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: avoid possible recursive lock when racing acquire lock 14150/head
authorJason Dillaman <dillaman@redhat.com>
Thu, 19 Jan 2017 01:54:22 +0000 (20:54 -0500)
committerNathan Cutler <ncutler@suse.com>
Sun, 26 Mar 2017 16:03:15 +0000 (18:03 +0200)
Fixes: http://tracker.ceph.com/issues/17447
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 5e46e8eb664f573bd70ae7c96a6d9a98b0deb09e)

src/librbd/Operations.cc

index 030ed6d70b2b6fab5f1ccbaa4219022fe5865306..5f4b93c6ec7802a979f53a84aa3c21eac7942aba 100644 (file)
@@ -193,10 +193,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