From: "Yan, Zheng" <zyan@redhat.com>
Date: Thu, 23 Nov 2017 18:28:16 +0800
Subject: ceph: voluntarily drop Fx cap for readdir request
Git-commit: 87c91a965aa28809888cbae3b2de35a486ed7107
Patch-mainline: v4.16-rc1
References: FATE#324714
MDS need to rdlock directory inode's filelock when handling readdir
request. Voluntarily dropping CEPH_CAP_AUTH_EXCL avoids a cap revoke
message.
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Acked-by: Luis Henriques <lhenriques@suse.com>
---
fs/ceph/dir.c | 1 +
1 file changed, 1 insertion(+)
--- a/fs/ceph/dir.c
+++ b/fs/ceph/dir.c
@@ -380,6 +380,7 @@ more:
if (op == CEPH_MDS_OP_READDIR) {
req->r_direct_hash = ceph_frag_value(frag);
__set_bit(CEPH_MDS_R_DIRECT_IS_HASH, &req->r_req_flags);
+ req->r_inode_drop = CEPH_CAP_FILE_EXCL;
}
if (fi->last_name) {
req->r_path2 = kstrdup(fi->last_name, GFP_KERNEL);