Fuse: honor RLIMIT_FSIZE in fuse_file_fallocate
Subsystems (2)
PATCH 1/1 Fuse: honor RLIMIT_FSIZE in fuse_file_fallocate
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 <[email protected]>
--- fs/fuse/file.c | 7 +++++++ 1 file changed, 7 insertions(+)
fs/fuse/file.c +7 -0
@@ -3051,6 +3051,13 @@ static long fuse_file_fallocate(struct file *file, int mode, loff_t offset, } } +if (!(mode &FALLOC_FL_KEEP_SIZE ) && + offset + length >i_size_read (inode)) { + err =inode_newsize_ok (inode, offset + length); +if (err) +return err; + } +if (!(mode &FALLOC_FL_KEEP_SIZE ))set_bit (FUSE_I_SIZE_UNSTABLE , &fi->state);
Signature · 1 line
2.20.1.2.gb21ebb6
Quoted 5 lines · Liu Bo
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.
Applied, thanks.
Miklos