From: Xiubo Li Date: Tue, 26 Sep 2023 04:54:58 +0000 (+0800) Subject: ceph: allow xlock state to be LOCK_PREXLOCK when putting it X-Git-Tag: v18.2.1~88^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3ea0ca348c35aacb032b4df1aca2357c6fdf006a;p=ceph.git ceph: allow xlock state to be LOCK_PREXLOCK when putting it 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 (cherry picked from commit 81890e8a57341b3a14db310ae1700394ecdbbad4) --- diff --git a/src/mds/SimpleLock.h b/src/mds/SimpleLock.h index 725c4488c17f..ef41c4088557 100644 --- a/src/mds/SimpleLock.h +++ b/src/mds/SimpleLock.h @@ -417,6 +417,7 @@ public: 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);