]> 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)
commitf3369d7d756d87bd2cddb4723a5e77a995f7e3ae
tree0ba22abf9482dc9ad7abadd18f1b2b1ede2ff95a
parentc9470f59ec5638ed20d5e83e13aca19a55f26d2e
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