aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorSven Schmidt <4sschmid@informatik.uni-hamburg.de>2017-02-24 15:01:22 -0800
committerMister Oyster <oysterized@gmail.com>2017-04-11 11:00:22 +0200
commitac8e2cd3b18cff9d33ec2884b8e75bfc2a2b8c5e (patch)
tree1da9fd7f1a2c9f62272bd8b25afb0bf661c054f2 /fs
parent4aaa09cb82d3147ba8fd50100eb86ac15d370688 (diff)
fs/squashfs: change usage of LZ4 to work with new LZ4 version
Update fs/squashfs to use the updated functions from the new LZ4 module. Link: http://lkml.kernel.org/r/1486321748-19085-5-git-send-email-4sschmid@informatik.uni-hamburg.de Signed-off-by: Sven Schmidt <4sschmid@informatik.uni-hamburg.de> Cc: Bongkyu Kim <bongkyu.kim@lge.com> Cc: Rui Salvaterra <rsalvaterra@gmail.com> Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: David S. Miller <davem@davemloft.net> Cc: Anton Vorontsov <anton@enomsg.org> Cc: Colin Cross <ccross@android.com> Cc: Kees Cook <keescook@chromium.org> Cc: Tony Luck <tony.luck@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/squashfs/lz4_wrapper.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/squashfs/lz4_wrapper.c b/fs/squashfs/lz4_wrapper.c
index df4fa3c7d..5d8512534 100644
--- a/fs/squashfs/lz4_wrapper.c
+++ b/fs/squashfs/lz4_wrapper.c
@@ -95,18 +95,18 @@ static int lz4_uncompress(struct squashfs_sb_info *msblk, void *strm,
struct squashfs_page_actor *output)
{
int res;
- size_t dest_len = output->length;
struct squashfs_lz4 *stream = strm;
squashfs_bh_to_buf(bh, b, stream->input, offset, length,
msblk->devblksize);
- res = lz4_decompress_unknownoutputsize(stream->input, length,
- stream->output, &dest_len);
- if (res)
+ res = LZ4_decompress_safe(stream->input, stream->output,
+ length, output->length);
+
+ if (res < 0)
return -EIO;
- squashfs_buf_to_actor(stream->output, output, dest_len);
+ squashfs_buf_to_actor(stream->output, output, res);
- return dest_len;
+ return res;
}
const struct squashfs_decompressor squashfs_lz4_comp_ops = {