Merge tag 'ceph-for-4.11-rc9' of git://github.com/ceph/ceph-client

Pull ceph fix from Ilya Dryomov:
"A fix for a kernel stack overflow bug in ceph setattr code, marked for
stable"

* tag 'ceph-for-4.11-rc9' of git://github.com/ceph/ceph-client:
ceph: fix recursion between ceph_set_acl() and __ceph_setattr()

+10 -12
+10 -12
fs/ceph/inode.c
··· 2071 2071 if (inode_dirty_flags) 2072 2072 __mark_inode_dirty(inode, inode_dirty_flags); 2073 2073 2074 - if (ia_valid & ATTR_MODE) { 2075 - err = posix_acl_chmod(inode, attr->ia_mode); 2076 - if (err) 2077 - goto out_put; 2078 - } 2079 2074 2080 2075 if (mask) { 2081 2076 req->r_inode = inode; ··· 2084 2089 ceph_cap_string(dirtied), mask); 2085 2090 2086 2091 ceph_mdsc_put_request(req); 2087 - if (mask & CEPH_SETATTR_SIZE) 2092 + ceph_free_cap_flush(prealloc_cf); 2093 + 2094 + if (err >= 0 && (mask & CEPH_SETATTR_SIZE)) 2088 2095 __ceph_do_pending_vmtruncate(inode); 2089 - ceph_free_cap_flush(prealloc_cf); 2090 - return err; 2091 - out_put: 2092 - ceph_mdsc_put_request(req); 2093 - ceph_free_cap_flush(prealloc_cf); 2096 + 2094 2097 return err; 2095 2098 } 2096 2099 ··· 2107 2114 if (err != 0) 2108 2115 return err; 2109 2116 2110 - return __ceph_setattr(inode, attr); 2117 + err = __ceph_setattr(inode, attr); 2118 + 2119 + if (err >= 0 && (attr->ia_valid & ATTR_MODE)) 2120 + err = posix_acl_chmod(inode, attr->ia_mode); 2121 + 2122 + return err; 2111 2123 } 2112 2124 2113 2125 /*