When the journal logs are successfully flushed the lockers' state
could be LOCK_PREXLOCK if the inflight OP need to gather issued
caps.
Fixes: https://tracker.ceph.com/issues/44565
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit
81890e8a57341b3a14db310ae1700394ecdbbad4)
ceph_assert(state == LOCK_XLOCK || state == LOCK_XLOCKDONE ||
state == LOCK_XLOCKSNAP || state == LOCK_LOCK_XLOCK ||
state == LOCK_LOCK || /* if we are a leader of a peer */
+ state == LOCK_PREXLOCK ||
is_locallock());
--more()->num_xlock;
parent->put(MDSCacheObject::PIN_LOCK);