]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ceph: Don't update i_max_size when handling non-auth cap
authorYan, Zheng <zheng.z.yan@intel.com>
Mon, 19 Nov 2012 02:49:04 +0000 (10:49 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jan 2013 16:46:49 +0000 (08:46 -0800)
(cherry picked from commit 5e62ad30157d0da04cf40c6d1a2f4bc840948b9c)

The cap from non-auth mds doesn't have a meaningful max_size value.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ceph/caps.c

index 3251e9cc64014fc99f7660d46388427732c88114..c633d1d728b38ff609d98b1543970f54eeae670a 100644 (file)
@@ -2388,7 +2388,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) {