]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: avoid possible recursive lock when racing acquire lock 14151/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:04:23 +0000 (18:04 +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 3d4dd0d479f5378016e0f0d6e3fe9cacfc54f965..773b58f9eabc0cce086a5d95e89c4754c8c1455a 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