librbd: avoid possible recursive lock when racing acquire lock

Fixes: http://tracker.ceph.com/issues/17447
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
This commit is contained in:
Jason Dillaman 2017-01-18 20:54:22 -05:00
parent 5c5147efdf
commit 5e46e8eb66

View 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