From: Mykola Golub Date: Tue, 28 Mar 2017 13:55:11 +0000 (+0200) Subject: jewel: librbd: possible race in ExclusiveLock handle_peer_notification X-Git-Tag: v10.2.7~2^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fcc3ada733bac74a642ccd0f1ed6301ad7318a30;p=ceph.git 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) --- diff --git a/src/librbd/ExclusiveLock.cc b/src/librbd/ExclusiveLock.cc index 3fedf8ddee34..12fe117063b0 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();