From 3b0a7a8d2aa0dbc7cfce317bd327f88afce2469e Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Wed, 18 Jan 2017 20:54:22 -0500 Subject: [PATCH] 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) --- src/librbd/Operations.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 -- 2.39.5