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: v12.0.0~130^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5e46e8eb664f573bd70ae7c96a6d9a98b0deb09e;p=ceph.git librbd: avoid possible recursive lock when racing acquire lock Fixes: http://tracker.ceph.com/issues/17447 Signed-off-by: Jason Dillaman --- diff --git a/src/librbd/Operations.cc b/src/librbd/Operations.cc index 1c1aa38a332d..a3a828e0fa44 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