From: Lihong Kou Date: Mon, 5 Aug 2019 11:13:52 +0000 (+0800) Subject: f2fs: cleanup the code in build_sit_entries. X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=290c30d4454ccf85de372af499e32e86f5d94188;p=linux.git f2fs: cleanup the code in build_sit_entries. We do not need to set the SBI_NEED_FSCK flag in the error paths, if we return error here, we will not update the checkpoint flag, so the code is useless, just remove it. Signed-off-by: Lihong Kou Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index a1ece0caad788..6aec63f0523b1 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -4168,7 +4168,6 @@ static int build_sit_entries(struct f2fs_sb_info *sbi) if (start >= MAIN_SEGS(sbi)) { f2fs_err(sbi, "Wrong journal entry on segno %u", start); - set_sbi_flag(sbi, SBI_NEED_FSCK); err = -EFSCORRUPTED; break; } @@ -4208,7 +4207,6 @@ static int build_sit_entries(struct f2fs_sb_info *sbi) if (!err && total_node_blocks != valid_node_count(sbi)) { f2fs_err(sbi, "SIT is corrupted node# %u vs %u", total_node_blocks, valid_node_count(sbi)); - set_sbi_flag(sbi, SBI_NEED_FSCK); err = -EFSCORRUPTED; }