From: Yan, Zheng Date: Thu, 5 Mar 2020 12:21:03 +0000 (+0800) Subject: ceph: update i_requested_max_size only when sending cap msg to auth mds X-Git-Tag: v5.7-rc1~39^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=11ba6b9ceeb4e20e0610ad249f9187dba412f787;p=thirdparty%2Fkernel%2Flinux.git 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" Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov --- diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 02dd2a9bd2522..0b3a363100332 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);