Messages in this thread Patch in this message | | | From | Yue Hu <> | Subject | [PATCH] erofs: fix the per-CPU buffer decompression for small output size | Date | Wed, 13 Oct 2021 17:29:05 +0800 |
| |
From: Yue Hu <huyue2@yulong.com>
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 <huyue2@yulong.com> --- 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
| |