]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/librbd/ImageWatcher.cc
update sources to 12.2.7
[ceph.git] / ceph / src / librbd / ImageWatcher.cc
index f8ffda4a75c624719b8c78997754411df33b90ab..daac18868f71d04f22126a1322f1dbf302b0cad0 100644 (file)
@@ -364,7 +364,7 @@ void ImageWatcher<I>::schedule_request_lock(bool use_timer, int timer_delay) {
          !m_image_ctx.exclusive_lock->is_lock_owner());
 
   RWLock::RLocker watch_locker(this->m_watch_lock);
-  if (this->m_watch_state == Watcher::WATCH_STATE_REGISTERED) {
+  if (this->is_registered(this->m_watch_lock)) {
     ldout(m_image_ctx.cct, 15) << this << " requesting exclusive lock" << dendl;
 
     FunctionContext *ctx = new FunctionContext(