From: Jason Dillaman Date: Thu, 14 Apr 2016 12:14:46 +0000 (-0400) Subject: librbd: dynamically disabling exclusive lock might leave lingering request X-Git-Tag: ses3-milestone4~16^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=769f99490ee4ae47a00a4071a1fe63e565ec3586;p=ceph.git librbd: dynamically disabling exclusive lock might leave lingering request Signed-off-by: Jason Dillaman --- diff --git a/src/librbd/ImageWatcher.cc b/src/librbd/ImageWatcher.cc index df8f366520d4..de337c289e3c 100644 --- a/src/librbd/ImageWatcher.cc +++ b/src/librbd/ImageWatcher.cc @@ -403,6 +403,11 @@ void ImageWatcher::schedule_request_lock(bool use_timer, int timer_delay) { void ImageWatcher::notify_request_lock() { RWLock::RLocker owner_locker(m_image_ctx.owner_lock); RWLock::RLocker snap_locker(m_image_ctx.snap_lock); + + // ExclusiveLock state machine can be dynamically disabled + if (m_image_ctx.exclusive_lock == nullptr) { + return; + } assert(!m_image_ctx.exclusive_lock->is_lock_owner()); ldout(m_image_ctx.cct, 10) << this << " notify request lock" << dendl;