From: Yue Hu <[email protected]> Note that z_erofs_lz4_decompress() will return a positive value if decompression succeeds. However, we do not copy_from_pcpubuf() due to !ret. Let's fix it.
Signed-off-by: Yue Hu <[email protected]> --- fs/erofs/decompressor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/erofs/decompressor.c b/fs/erofs/decompressor.c index a5bc4b1..e4cab4e 100644 --- a/fs/erofs/decompressor.c +++ b/fs/erofs/decompressor.c @@ -326,7 +326,7 @@ static int z_erofs_decompress_generic(struct z_erofs_decompress_req *rq, rq->inplace_io = false; ret = alg->decompress(rq, dst); - if (!ret) + if (ret > 0) copy_from_pcpubuf(rq->out, dst, rq->pageofs_out, rq->outputsize); -- 1.9.1
