Commit 290c30d4 authored by Lihong Kou's avatar Lihong Kou Committed by Jaegeuk Kim

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: default avatarLihong Kou <koulihong@huawei.com>
Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 27cae0bc
...@@ -4168,7 +4168,6 @@ static int build_sit_entries(struct f2fs_sb_info *sbi) ...@@ -4168,7 +4168,6 @@ static int build_sit_entries(struct f2fs_sb_info *sbi)
if (start >= MAIN_SEGS(sbi)) { if (start >= MAIN_SEGS(sbi)) {
f2fs_err(sbi, "Wrong journal entry on segno %u", f2fs_err(sbi, "Wrong journal entry on segno %u",
start); start);
set_sbi_flag(sbi, SBI_NEED_FSCK);
err = -EFSCORRUPTED; err = -EFSCORRUPTED;
break; break;
} }
...@@ -4208,7 +4207,6 @@ static int build_sit_entries(struct f2fs_sb_info *sbi) ...@@ -4208,7 +4207,6 @@ static int build_sit_entries(struct f2fs_sb_info *sbi)
if (!err && total_node_blocks != valid_node_count(sbi)) { if (!err && total_node_blocks != valid_node_count(sbi)) {
f2fs_err(sbi, "SIT is corrupted node# %u vs %u", f2fs_err(sbi, "SIT is corrupted node# %u vs %u",
total_node_blocks, valid_node_count(sbi)); total_node_blocks, valid_node_count(sbi));
set_sbi_flag(sbi, SBI_NEED_FSCK);
err = -EFSCORRUPTED; err = -EFSCORRUPTED;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment