提交 87c91a96 编写于 作者: Y Yan, Zheng 提交者: Ilya Dryomov

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: N"Yan, Zheng" <zyan@redhat.com>
Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
上级 be70489e
...@@ -381,6 +381,7 @@ static int ceph_readdir(struct file *file, struct dir_context *ctx) ...@@ -381,6 +381,7 @@ static int ceph_readdir(struct file *file, struct dir_context *ctx)
if (op == CEPH_MDS_OP_READDIR) { if (op == CEPH_MDS_OP_READDIR) {
req->r_direct_hash = ceph_frag_value(frag); req->r_direct_hash = ceph_frag_value(frag);
__set_bit(CEPH_MDS_R_DIRECT_IS_HASH, &req->r_req_flags); __set_bit(CEPH_MDS_R_DIRECT_IS_HASH, &req->r_req_flags);
req->r_inode_drop = CEPH_CAP_FILE_EXCL;
} }
if (fi->last_name) { if (fi->last_name) {
req->r_path2 = kstrdup(fi->last_name, GFP_KERNEL); req->r_path2 = kstrdup(fi->last_name, GFP_KERNEL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册