aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2018-02-02 14:37:50 +0000
committerandroid-build-merger <android-build-merger@google.com>2018-02-02 14:37:50 +0000
commit876b4322272c57efb9df1f4f553ca03f1d019ce2 (patch)
tree9857b28a56dee302cadaa9f93986907d1bdadfed
parent08e57a9c8fd10baea43df6f19957043d57f819b5 (diff)
parent490428c5ae1f9380acdd9eeb757a771222f09fd2 (diff)
downloadf2fs-tools-876b4322272c57efb9df1f4f553ca03f1d019ce2.tar.gz
fsck.f2fs: avoid wrong IS_VALID_BLK_ADDR am: 5f601547ee am: 79d662e879
am: 490428c5ae Change-Id: I06665456987ce0e66b9653fe8f47f24c2b6b7bfd
-rw-r--r--fsck/f2fs.h11
1 files changed, 1 insertions, 10 deletions
diff --git a/fsck/f2fs.h b/fsck/f2fs.h
index 34b2481..b7b6305 100644
--- a/fsck/f2fs.h
+++ b/fsck/f2fs.h
@@ -369,21 +369,12 @@ static inline bool IS_VALID_NID(struct f2fs_sb_info *sbi, u32 nid)
static inline bool IS_VALID_BLK_ADDR(struct f2fs_sb_info *sbi, u32 addr)
{
- int i;
-
if (addr >= le64_to_cpu(F2FS_RAW_SUPER(sbi)->block_count) ||
addr < SM_I(sbi)->main_blkaddr) {
DBG(1, "block addr [0x%x]\n", addr);
return 0;
}
-
- for (i = 0; i < NO_CHECK_TYPE; i++) {
- struct curseg_info *curseg = CURSEG_I(sbi, i);
-
- if (START_BLOCK(sbi, curseg->segno) +
- curseg->next_blkoff == addr)
- return 0;
- }
+ /* next block offset will be checked at the end of fsck. */
return 1;
}