]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: add additional size check in ceph_setattr()
authorChengguang Xu <cgxu519@gmx.com>
Sun, 5 Aug 2018 11:33:01 +0000 (19:33 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 13 Aug 2018 15:55:43 +0000 (17:55 +0200)
commit3ff2110c6e4e49dd5cc709fedbb523e604cfd70a
tree0ba22abf9482dc9ad7abadd18f1b2b1ede2ff95a
parent6009b8b3c48e37f7db839cc069418ad46e9f4839
ceph: add additional size check in ceph_setattr()

ceph_setattr() finally calls vfs function inode_newsize_ok()
to do offset validation and that is based on sb->s_maxbytes.
Because we set sb->s_maxbytes to MAX_LFS_FILESIZE to through
VFS check and do proper offset validation in cephfs level,
we need adding proper offset validation before calling
inode_newsize_ok().

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/inode.c