From: Yan, Zheng Date: Mon, 19 Nov 2012 02:49:04 +0000 (+0800) Subject: ceph: Don't update i_max_size when handling non-auth cap X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5e62ad30157d0da04cf40c6d1a2f4bc840948b9c;p=linux-beck.git ceph: Don't update i_max_size when handling non-auth cap The cap from non-auth mds doesn't have a meaningful max_size value. Signed-off-by: Yan, Zheng Signed-off-by: Sage Weil --- diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 2d0141e95c88..8072aefc427c 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -2390,7 +2390,7 @@ static void handle_cap_grant(struct inode *inode, struct ceph_mds_caps *grant, &atime); /* max size increase? */ - if (max_size != ci->i_max_size) { + if (ci->i_auth_cap == cap && max_size != ci->i_max_size) { dout("max_size %lld -> %llu\n", ci->i_max_size, max_size); ci->i_max_size = max_size; if (max_size >= ci->i_wanted_max_size) {