diff options
author | Yan, Zheng <zyan@redhat.com> | 2017-11-23 18:28:16 +0800 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2018-01-29 18:36:05 +0100 |
commit | 87c91a965aa28809888cbae3b2de35a486ed7107 (patch) | |
tree | 1ca5e8f54b55f53c4cdbbe19c9e3fd5cce42903f /fs/ceph/dir.c | |
parent | be70489eff41a84f26b1d772b595cc043e0edeb6 (diff) | |
download | talos-op-linux-87c91a965aa28809888cbae3b2de35a486ed7107.tar.gz talos-op-linux-87c91a965aa28809888cbae3b2de35a486ed7107.zip |
ceph: voluntarily drop Fx cap for readdir request
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>
Diffstat (limited to 'fs/ceph/dir.c')
-rw-r--r-- | fs/ceph/dir.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index aa2618f12cb7..9fde02cd5568 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -381,6 +381,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); |