This is a note to let you know that I've just added the patch titled f2fs: compress: fix compression chksum to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: f2fs-compress-fix-compression-chksum.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit c31d743b70ccb3afeeb91fda9a09a5b31fab3d34 Author: Chao Yu <chao@xxxxxxxxxx> Date: Wed Dec 9 16:42:14 2020 +0800 f2fs: compress: fix compression chksum [ Upstream commit 75e91c888989cf2df5c78b251b07de1f5052e30e ] 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: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index 6fb875c8cf28d..8dccb59d072b7 100644 --- a/fs/f2fs/compress.c +++ b/fs/f2fs/compress.c @@ -783,7 +783,7 @@ void f2fs_decompress_pages(struct bio *bio, struct page *page, bool verity) 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 *bio, struct page *page, bool verity) provided, calculated); } set_sbi_flag(sbi, SBI_NEED_FSCK); - WARN_ON_ONCE(1); } } diff --git a/fs/f2fs/compress.h b/fs/f2fs/compress.h new file mode 100644 index 0000000000000..e69de29bb2d1d