Skip to content

Commit

Permalink
ceph: allow xlock state to be LOCK_PREXLOCK when putting it
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
lxbsz committed Jun 18, 2023
1 parent 0ea177e commit 6e29bf3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/mds/SimpleLock.h
Expand Up @@ -417,6 +417,7 @@ class SimpleLock {
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);
Expand Down

0 comments on commit 6e29bf3

Please sign in to comment.