From: Xiubo Li <xiubli@xxxxxxxxxx> If just before the revoke request, which will increase the 'seq', is sent out the clients released the corresponding caps and sent out the cap update request to MDS with old 'seq', the mds will miss checking the seqs and calculating the caps. We should always send an ack for revoke requests. Cc: stable@xxxxxxxxxxxxxxx Cc: Patrick Donnelly <pdonnell@xxxxxxxxxx> URL: https://tracker.ceph.com/issues/61782 Signed-off-by: Xiubo Li <xiubli@xxxxxxxxxx> --- fs/ceph/caps.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 1052885025b3..eee2fbca3430 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -3737,6 +3737,15 @@ static void handle_cap_grant(struct inode *inode, } BUG_ON(cap->issued & ~cap->implemented); + /* don't let check_caps skip sending a response to MDS for revoke msgs */ + if (le32_to_cpu(grant->op) == CEPH_CAP_OP_REVOKE) { + cap->mds_wanted = 0; + if (cap == ci->i_auth_cap) + check_caps = 1; /* check auth cap only */ + else + check_caps = 2; /* check all caps */ + } + if (extra_info->inline_version > 0 && extra_info->inline_version >= ci->i_inline_version) { ci->i_inline_version = extra_info->inline_version; -- 2.40.1