From dbc32361eff9a4d0c553c16c62b77606a59b80e8 Mon Sep 17 00:00:00 2001 From: Mykola Golub Date: Sat, 21 Jul 2018 09:59:03 +0300 Subject: [PATCH] librbd: drop snap lock before sending copyup request Signed-off-by: Mykola Golub --- src/librbd/io/ObjectRequest.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/librbd/io/ObjectRequest.cc b/src/librbd/io/ObjectRequest.cc index 647282853b1..9bb1f50e31c 100644 --- a/src/librbd/io/ObjectRequest.cc +++ b/src/librbd/io/ObjectRequest.cc @@ -352,13 +352,15 @@ void ObjectReadRequest::copyup() { image_ctx->copyup_list[this->m_object_no] = new_req; image_ctx->copyup_list_lock.Unlock(); + image_ctx->parent_lock.put_read(); + image_ctx->snap_lock.put_read(); new_req->send(); } else { image_ctx->copyup_list_lock.Unlock(); + image_ctx->parent_lock.put_read(); + image_ctx->snap_lock.put_read(); } - image_ctx->parent_lock.put_read(); - image_ctx->snap_lock.put_read(); image_ctx->owner_lock.put_read(); this->finish(0); } -- 2.39.5