]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: drop snap lock before sending copyup request
authorMykola Golub <mgolub@suse.com>
Sat, 21 Jul 2018 06:59:03 +0000 (09:59 +0300)
committerJason Dillaman <dillaman@redhat.com>
Tue, 14 Aug 2018 22:29:45 +0000 (18:29 -0400)
Signed-off-by: Mykola Golub <mgolub@suse.com>
src/librbd/io/ObjectRequest.cc

index 647282853b1ad606c08d20bcabe1bb38434a1948..9bb1f50e31c42de0b242007ae2a8ddc7f1ff503c 100644 (file)
@@ -352,13 +352,15 @@ void ObjectReadRequest<I>::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);
 }