this avoid assertion in MutaionImpl::finish_locking()
Fix: https://tracker.ceph.com/issues/45261
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
if (lock->get_parent()->is_auth()) {
// auth
while (1) {
- if (lock->can_xlock(client) &&
+ if (mut->locking && // started xlock (not preempt other request)
+ lock->can_xlock(client) &&
!(lock->get_state() == LOCK_LOCK_XLOCK && // client is not xlocker or
in && in->issued_caps_need_gather(lock))) { // xlocker does not hold shared cap
lock->set_state(LOCK_XLOCK);