From: Jason Dillaman Date: Thu, 19 Jan 2017 01:54:22 +0000 (-0500) Subject: librbd: avoid possible recursive lock when racing acquire lock X-Git-Tag: v11.2.1~190^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F14151%2Fhead;p=ceph.git librbd: avoid possible recursive lock when racing acquire lock Fixes: http://tracker.ceph.com/issues/17447 Signed-off-by: Jason Dillaman (cherry picked from commit 5e46e8eb664f573bd70ae7c96a6d9a98b0deb09e) --- diff --git a/src/librbd/Operations.cc b/src/librbd/Operations.cc index 3d4dd0d479f53..773b58f9eabc0 100644 --- a/src/librbd/Operations.cc +++ b/src/librbd/Operations.cc @@ -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, - &C_InvokeAsyncRequest::handle_acquire_exclusive_lock>( - this); + Context *ctx = util::create_async_context_callback( + image_ctx, util::create_context_callback< + C_InvokeAsyncRequest, + &C_InvokeAsyncRequest::handle_acquire_exclusive_lock>(this)); if (request_lock) { // current lock owner doesn't support op -- try to perform