]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: release lock after demote 11940/head
authorMykola Golub <mgolub@mirantis.com>
Sat, 12 Nov 2016 12:23:20 +0000 (14:23 +0200)
committerMykola Golub <mgolub@mirantis.com>
Sat, 12 Nov 2016 12:23:20 +0000 (14:23 +0200)
Fixes: http://tracker.ceph.com/issues/17880
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
src/librbd/internal.cc

index 21188895c2770964debe0a017f5e2e3fdfc6837d..21481cec7573857bee4c575906d66c1c05f21472 100644 (file)
@@ -2588,6 +2588,12 @@ int mirror_image_disable_internal(ImageCtx *ictx, bool force,
       return -EROFS;
     }
 
+    BOOST_SCOPE_EXIT_ALL( (ictx) ) {
+      C_SaferCond lock_ctx;
+      ictx->exclusive_lock->release_lock(&lock_ctx);
+      lock_ctx.wait();
+    };
+
     RWLock::RLocker snap_locker(ictx->snap_lock);
     if (ictx->journal == nullptr) {
       lderr(cct) << "journal is not active" << dendl;