]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
jewel: librbd: possible race in ExclusiveLock handle_peer_notification 14233/head
authorMykola Golub <mgolub@mirantis.com>
Tue, 28 Mar 2017 13:55:11 +0000 (15:55 +0200)
committerKen Dreyer <kdreyer@redhat.com>
Wed, 29 Mar 2017 18:17:28 +0000 (12:17 -0600)
This is a cherry-pick from kraken -- the master diverged after
ManagedLock refactoring and is not affected.

Fix: http://tracker.ceph.com/issues/19368
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
(cherry picked from commit df59d6d5f7deb586cf14a6ef6984e6847db08852)

src/librbd/ExclusiveLock.cc

index 3fedf8ddee347e4e9abed1f7bc10df61a0bd3abb..12fe117063b02a55741fe1d6f990ae85f72dfa04 100644 (file)
@@ -239,6 +239,7 @@ void ExclusiveLock<I>::handle_peer_notification(int r) {
 
     ldout(m_image_ctx.cct, 10) << this << " " << __func__ << dendl;
     assert(get_active_action() == ACTION_REQUEST_LOCK);
+    m_state = STATE_ACQUIRING;
 
     if (r >= 0) {
       execute_next_action();