mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
f2fs: compress: fix compression chksum
This patch addresses minor issues in compression chksum.
Fixes: b28f047b28
("f2fs: compress: support chksum")
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
@@ -796,7 +796,7 @@ void f2fs_decompress_pages(struct bio *bio, struct page *page, bool verity)
|
|||||||
|
|
||||||
ret = cops->decompress_pages(dic);
|
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 provided = le32_to_cpu(dic->cbuf->chksum);
|
||||||
u32 calculated = f2fs_crc32(sbi, dic->cbuf->cdata, dic->clen);
|
u32 calculated = f2fs_crc32(sbi, dic->cbuf->cdata, dic->clen);
|
||||||
|
|
||||||
@@ -809,7 +809,6 @@ void f2fs_decompress_pages(struct bio *bio, struct page *page, bool verity)
|
|||||||
provided, calculated);
|
provided, calculated);
|
||||||
}
|
}
|
||||||
set_sbi_flag(sbi, SBI_NEED_FSCK);
|
set_sbi_flag(sbi, SBI_NEED_FSCK);
|
||||||
WARN_ON_ONCE(1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
0
fs/f2fs/compress.h
Normal file
0
fs/f2fs/compress.h
Normal file
Reference in New Issue
Block a user