5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Chao Yu <yuchao0@xxxxxxxxxx> commit 75e91c888989cf2df5c78b251b07de1f5052e30e upstream. This patch addresses minor issues in compression chksum. Fixes: b28f047b28c5 ("f2fs: compress: support chksum") Signed-off-by: Chao Yu <yuchao0@xxxxxxxxxx> Signed-off-by: Jaegeuk Kim <jaegeuk@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/f2fs/compress.c | 3 +-- fs/f2fs/compress.h | 0 fs/f2fs/compress.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) create mode 100644 fs/f2fs/compress.h --- a/fs/f2fs/compress.c +++ b/fs/f2fs/compress.c @@ -783,7 +783,7 @@ void f2fs_decompress_pages(struct bio *b ret = cops->decompress_pages(dic); - if (!ret && fi->i_compress_flag & 1 << COMPRESS_CHKSUM) { + if (!ret && (fi->i_compress_flag & 1 << COMPRESS_CHKSUM)) { u32 provided = le32_to_cpu(dic->cbuf->chksum); u32 calculated = f2fs_crc32(sbi, dic->cbuf->cdata, dic->clen); @@ -796,7 +796,6 @@ void f2fs_decompress_pages(struct bio *b provided, calculated); } set_sbi_flag(sbi, SBI_NEED_FSCK); - WARN_ON_ONCE(1); } }