From: Chao Yu Date: Wed, 16 Mar 2022 10:20:00 +0000 (+0800) Subject: f2fs: compress: fix to print raw data size in error path of lz4 decompression X-Git-Tag: v5.18-rc1~176^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d284af43f703760e261b1601378a0c13a19d5f1f;p=thirdparty%2Fkernel%2Flinux.git f2fs: compress: fix to print raw data size in error path of lz4 decompression In lz4_decompress_pages(), if size of decompressed data is not equal to expected one, we should print the size rather than size of target buffer for decompressed data, fix it. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index 67bac2792e571..11e99bf6286c7 100644 --- a/fs/f2fs/compress.c +++ b/fs/f2fs/compress.c @@ -314,10 +314,9 @@ static int lz4_decompress_pages(struct decompress_io_ctx *dic) } if (ret != PAGE_SIZE << dic->log_cluster_size) { - printk_ratelimited("%sF2FS-fs (%s): lz4 invalid rlen:%zu, " + printk_ratelimited("%sF2FS-fs (%s): lz4 invalid ret:%d, " "expected:%lu\n", KERN_ERR, - F2FS_I_SB(dic->inode)->sb->s_id, - dic->rlen, + F2FS_I_SB(dic->inode)->sb->s_id, ret, PAGE_SIZE << dic->log_cluster_size); return -EIO; }