]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: check that the new inode size is within limits in ceph_fallocate()
authorLuis Henriques <lhenriques@suse.com>
Fri, 5 May 2017 17:28:44 +0000 (18:28 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 24 May 2017 16:10:54 +0000 (18:10 +0200)
commitd6469a39c70a1dd008afdb4867ae43a59b5a97fb
treec4d4c136eb0924a4e4f23c8dfcb53eff507c8eac
parenta63f944a88bbd9a7fbf1805efe219c786918a150
ceph: check that the new inode size is within limits in ceph_fallocate()

Currently the ceph client doesn't respect the rlimit in fallocate.  This
means that a user can allocate a file with size > RLIMIT_FSIZE.  This
patch adds the call to inode_newsize_ok() to verify filesystem limits and
ulimits.  This should make ceph successfully run xfstest generic/228.

Signed-off-by: Luis Henriques <lhenriques@suse.com>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/file.c