[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231003230155.355807-1-daeho43@gmail.com>
Date: Tue, 3 Oct 2023 16:01:55 -0700
From: Daeho Jeong <daeho43@...il.com>
To: linux-kernel@...r.kernel.org,
linux-f2fs-devel@...ts.sourceforge.net, kernel-team@...roid.com
Cc: Daeho Jeong <daehojeong@...gle.com>
Subject: [PATCH] f2fs-tools: use proper address entry count for direct nodes
From: Daeho Jeong <daehojeong@...gle.com>
For direct nodes, we have to use DEF_ADDRS_PER_BLOCK.
Signed-off-by: Daeho Jeong <daehojeong@...gle.com>
---
fsck/fsck.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fsck/fsck.c b/fsck/fsck.c
index 78ffdb6..56a7d31 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -2894,7 +2894,7 @@ static void fsck_failed_reconnect_file_dnode(struct f2fs_sb_info *sbi,
fsck->chk.valid_blk_cnt--;
f2fs_clear_main_bitmap(sbi, ni.blk_addr);
- for (i = 0; i < ADDRS_PER_BLOCK(&node->i); i++) {
+ for (i = 0; i < DEF_ADDRS_PER_BLOCK; i++) {
addr = le32_to_cpu(node->dn.addr[i]);
if (!addr)
continue;
--
2.42.0.582.g8ccd20d70d-goog
Powered by blists - more mailing lists