diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 1a0f07710a2b..952c99fcb636 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -3106,7 +3106,7 @@ static ssize_t __fuse_copy_file_range(struct file *file_in, loff_t pos_in, .nodeid_out = ff_out->nodeid, .fh_out = ff_out->fh, .off_out = pos_out, - .len = len, + .len = min_t(size_t, len, UINT_MAX & PAGE_MASK), .flags = flags }; struct fuse_write_out outarg;