summaryrefslogtreecommitdiffstats
path: root/fs/ceph/file.c
diff options
context:
space:
mode:
authorYan, Zheng2017-11-23 10:47:15 +0100
committerIlya Dryomov2018-01-29 18:36:04 +0100
commit222b7f90ba3825728fd27e9105aeee7af9576819 (patch)
tree8cbfe764c0bfd8bbdbcf399d75c4c24aac9d4b89 /fs/ceph/file.c
parentrbd: whitelist RBD_FEATURE_OPERATIONS feature bit (diff)
downloadkernel-qcow2-linux-222b7f90ba3825728fd27e9105aeee7af9576819.tar.gz
kernel-qcow2-linux-222b7f90ba3825728fd27e9105aeee7af9576819.tar.xz
kernel-qcow2-linux-222b7f90ba3825728fd27e9105aeee7af9576819.zip
ceph: voluntarily drop Ax cap for requests that create new inode
MDS need to rdlock directory inode's authlock when handling these requests. 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/file.c')
-rw-r--r--fs/ceph/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 5c17125f45c7..770dd3b413e4 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -396,7 +396,7 @@ int ceph_atomic_open(struct inode *dir, struct dentry *dentry,
req->r_dentry = dget(dentry);
req->r_num_caps = 2;
if (flags & O_CREAT) {
- req->r_dentry_drop = CEPH_CAP_FILE_SHARED;
+ req->r_dentry_drop = CEPH_CAP_FILE_SHARED | CEPH_CAP_AUTH_EXCL;
req->r_dentry_unless = CEPH_CAP_FILE_EXCL;
if (acls.pagelist) {
req->r_pagelist = acls.pagelist;