fsck.f2fs: fix incorrect boundary of IS_VALID_NID()
PATCH 1/1 fsck.f2fs: fix incorrect boundary of IS_VALID_NID()
nid should never equal to max_nid, fix it.
Signed-off-by Chao Yu <[email protected]>
--- fsck/f2fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fsck/f2fs.h +1 -1
@@ -369,7 +369,7 @@ static inline block_t sum_blk_addr(struct f2fs_sb_info *sbi, int base, int type)static inline bool IS_VALID_NID (struct f2fs_sb_info *sbi,u32 nid) { -return (nid <= (NAT_ENTRY_PER_BLOCK * +return (nid < (NAT_ENTRY_PER_BLOCK *le32_to_cpu (F2FS_RAW_SUPER (sbi)->segment_count_nat) << (sbi->log_blocks_per_seg -1 ))); }
Signature · 1 line
2.18.0.rc1