fuse: honor RLIMIT_FSIZE in fuse_file_fallocate
authorLiu Bo <bo.liu@linux.alibaba.com>
Wed, 17 Apr 2019 20:04:41 +0000 (04:04 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 May 2019 16:23:30 +0000 (18:23 +0200)
commit979d2433b873cde6d2d360644754d16fe9c5481b
tree03ed5f87b3b1d028e6bc604e4cd635c9fff793e8
parenta452f733f93e943d991fd98da1fda20e4cec77d1
fuse: honor RLIMIT_FSIZE in fuse_file_fallocate

commit 0cbade024ba501313da3b7e5dd2a188a6bc491b5 upstream.

fstests generic/228 reported this failure that fuse fallocate does not
honor what 'ulimit -f' has set.

This adds the necessary inode_newsize_ok() check.

Signed-off-by: Liu Bo <bo.liu@linux.alibaba.com>
Fixes: 05ba1f082300 ("fuse: add FALLOCATE operation")
Cc: <stable@vger.kernel.org> # v3.5
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/fuse/file.c