summaryrefslogtreecommitdiff
path: root/fs/ceph/caps.c
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2020-03-05 20:21:03 +0800
committerIlya Dryomov <idryomov@gmail.com>2020-03-30 12:42:42 +0200
commit11ba6b9ceeb4e20e0610ad249f9187dba412f787 (patch)
tree2e2a4c0320493fe6a5c33cc4a092c1a637b7b47f /fs/ceph/caps.c
parent135e671e54fcb46cb4f8b7be9673d3ea7b8ac315 (diff)
ceph: update i_requested_max_size only when sending cap msg to auth mds
Non-auth mds can't do anything to 'update max' cap message. Signed-off-by: "Yan, Zheng" <zyan@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/caps.c')
-rw-r--r--fs/ceph/caps.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index 02dd2a9bd252..0b3a36310033 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -1371,7 +1371,8 @@ static int __send_cap(struct ceph_mds_client *mdsc, struct ceph_cap *cap,
arg.size = inode->i_size;
ci->i_reported_size = arg.size;
arg.max_size = ci->i_wanted_max_size;
- ci->i_requested_max_size = arg.max_size;
+ if (cap == ci->i_auth_cap)
+ ci->i_requested_max_size = arg.max_size;
if (flushing & CEPH_CAP_XATTR_EXCL) {
old_blob = __ceph_build_xattrs_blob(ci);