dump.f2fs: minor clean ups

commit 1bc76585d5
category: bugfix
issue: #I6VAS0
CVE: NA

Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------

This patch cleans up, pointed by Chao.

Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
This commit is contained in:
Jaegeuk Kim 2021-07-13 16:15:35 -07:00 committed by dongsenhao
parent 38ec318024
commit 1d15d200dc
2 changed files with 2 additions and 2 deletions

View File

@ -256,8 +256,7 @@ static void dump_data_blk(struct f2fs_sb_info *sbi, __u64 offset, u32 blkaddr)
ASSERT(blkaddr == NULL_ADDR);
return;
}
if (blkaddr == NULL_ADDR || blkaddr == NEW_ADDR ||
blkaddr == COMPRESS_ADDR) {
if (!is_valid_data_blkaddr(blkaddr)) {
print_extent(false);
dump_extent.blk = 0;
dump_extent.len = 1;

View File

@ -1722,6 +1722,7 @@ int fsck_chk_dentry_blk(struct f2fs_sb_info *sbi, int casefolded, u32 blk_addr,
fsck->dentry_depth++;
new_dentry = calloc(sizeof(struct f2fs_dentry), 1);
ASSERT(new_dentry != NULL);
new_dentry->depth = fsck->dentry_depth;
memcpy(new_dentry->name, child->p_name, F2FS_NAME_LEN);
cur_dentry->next = new_dentry;