mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-29 23:53:55 +08:00
f2fs: remove duplicated code in sanity_check_area_boundary
Use seg_end_blkaddr instead of "segment0_blkaddr + (segment_count << log_blocks_per_seg)". Signed-off-by: Wang Xiaojun <wangxiaojun11@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
e6e421870b
commit
d89f589130
@ -2710,10 +2710,8 @@ static inline bool sanity_check_area_boundary(struct f2fs_sb_info *sbi,
|
||||
}
|
||||
|
||||
if (main_end_blkaddr > seg_end_blkaddr) {
|
||||
f2fs_info(sbi, "Wrong MAIN_AREA boundary, start(%u) end(%u) block(%u)",
|
||||
main_blkaddr,
|
||||
segment0_blkaddr +
|
||||
(segment_count << log_blocks_per_seg),
|
||||
f2fs_info(sbi, "Wrong MAIN_AREA boundary, start(%u) end(%llu) block(%u)",
|
||||
main_blkaddr, seg_end_blkaddr,
|
||||
segment_count_main << log_blocks_per_seg);
|
||||
return true;
|
||||
} else if (main_end_blkaddr < seg_end_blkaddr) {
|
||||
@ -2731,10 +2729,8 @@ static inline bool sanity_check_area_boundary(struct f2fs_sb_info *sbi,
|
||||
err = __f2fs_commit_super(bh, NULL);
|
||||
res = err ? "failed" : "done";
|
||||
}
|
||||
f2fs_info(sbi, "Fix alignment : %s, start(%u) end(%u) block(%u)",
|
||||
res, main_blkaddr,
|
||||
segment0_blkaddr +
|
||||
(segment_count << log_blocks_per_seg),
|
||||
f2fs_info(sbi, "Fix alignment : %s, start(%u) end(%llu) block(%u)",
|
||||
res, main_blkaddr, seg_end_blkaddr,
|
||||
segment_count_main << log_blocks_per_seg);
|
||||
if (err)
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user