]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph: allow xlock state to be LOCK_PREXLOCK when putting it
authorXiubo Li <xiubli@redhat.com>
Tue, 26 Sep 2023 04:54:58 +0000 (12:54 +0800)
committerXiubo Li <xiubli@redhat.com>
Tue, 26 Sep 2023 05:02:54 +0000 (13:02 +0800)
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)

src/mds/SimpleLock.h

index 725c4488c17f0a8fb7eafb965decc36da7bf999c..ef41c4088557127667f863976ac2bcef34b883ee 100644 (file)
@@ -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);