summaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorWang Xiaojun <wangxiaojun11@huawei.com>2020-09-18 08:31:24 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2020-09-29 01:48:34 -0700
commitd89f589130160a988c0108c81e6b13e0831d7603 (patch)
treec4a877cf1df36df092e86cca87dc4470cd8f0b47 /fs/f2fs
parente6e421870b5f4a73802dac7c123dcb02f929989f (diff)
downloadlinux-d89f589130160a988c0108c81e6b13e0831d7603.tar.gz
linux-d89f589130160a988c0108c81e6b13e0831d7603.tar.bz2
linux-d89f589130160a988c0108c81e6b13e0831d7603.zip
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>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/super.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index bbe993cc44ff..7a8a32ea7caa 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -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;