From fcc3ada733bac74a642ccd0f1ed6301ad7318a30 Mon Sep 17 00:00:00 2001 From: Mykola Golub Date: Tue, 28 Mar 2017 15:55:11 +0200 Subject: [PATCH] jewel: librbd: possible race in ExclusiveLock handle_peer_notification 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 (cherry picked from commit df59d6d5f7deb586cf14a6ef6984e6847db08852) --- src/librbd/ExclusiveLock.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/librbd/ExclusiveLock.cc b/src/librbd/ExclusiveLock.cc index 3fedf8ddee347..12fe117063b02 100644 --- a/src/librbd/ExclusiveLock.cc +++ b/src/librbd/ExclusiveLock.cc @@ -239,6 +239,7 @@ void ExclusiveLock::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(); -- 2.39.5