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:26:48 +0000 (18:26 +0200)
commiteb6079678c879de329aef0b524e2af2c48548939
tree3f0a816756dddc3b2b52b9339c62ce8066b65a96
parent3a78b1fb91dee049f522bdd177148f70e83b9799
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