!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(