dump.f2fs: remove redundant check condition in dump_node()
PATCH 1/1 dump.f2fs: remove redundant check condition in dump_node()
In dump_node(), f2fs_is_valid_blkaddr() has checked ni.blk_addr's validity and dump_node() will bail up if ni.blk_addr is invalid, so let's remove redundant check condition and print below:
if (ni.blk_addr == 0x0) MSG(force, "Invalid nat entry\n\n");
Signed-off-by Chao Yu <[email protected]>
--- fsck/dump.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
fsck/dump.c +1 -3
@@ -605,9 +605,7 @@ int dump_node(struct f2fs_sb_info *sbi, nid_t nid, int force)dev_read_block (node_blk, ni.blk_addr); -if (ni.blk_addr ==0x0 ) -MSG (force,"Invalid nat entry\n\n" ); -else if (!is_sit_bitmap_set (sbi, ni.blk_addr)) +if (!is_sit_bitmap_set (sbi, ni.blk_addr))MSG (force,"Invalid sit bitmap, %u\n\n" , ni.blk_addr);DBG (1 ,"node_blk.footer.ino [0x%x]\n" ,le32_to_cpu (node_blk->footer.ino));
Signature · 8 lines
2.40.1 _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel