* [f2fs-dev] [PATCH] dump.f2fs: remove redundant check condition in dump_node()
@ 2023-07-19 7:01 Chao Yu
0 siblings, 0 replies; only message in thread
From: Chao Yu @ 2023-07-19 7:01 UTC (permalink / raw)
To: jaegeuk; +Cc: linux-f2fs-devel
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 <chao@kernel.org>
---
fsck/dump.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fsck/dump.c b/fsck/dump.c
index 6c1857f..e7a1c5c 100644
--- a/fsck/dump.c
+++ b/fsck/dump.c
@@ -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));
--
2.40.1
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-07-19 7:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-19 7:01 [f2fs-dev] [PATCH] dump.f2fs: remove redundant check condition in dump_node() Chao Yu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).