fsck.f2fs: check all-zero inline data with helper is_zeroed

Signed-off-by: Sheng Yong <shengyong@oppo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Sheng Yong 2024-07-12 10:01:31 +08:00 committed by Jaegeuk Kim
parent 752fcbe65a
commit 2d653ca599

View File

@ -1094,10 +1094,7 @@ check_next:
}
}
if (!(node_blk->i.i_inline & F2FS_DATA_EXIST)) {
char buf[MAX_INLINE_DATA(node_blk)];
memset(buf, 0, MAX_INLINE_DATA(node_blk));
if (memcmp(buf, inline_data_addr(node_blk),
if (!is_zeroed(inline_data_addr(node_blk),
MAX_INLINE_DATA(node_blk))) {
ASSERT_MSG("[0x%x] junk inline data", nid);
if (c.fix_on) {