f2fs: cleanup the code in build_sit_entries.
authorLihong Kou <koulihong@huawei.com>
Mon, 5 Aug 2019 11:13:52 +0000 (19:13 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 23 Aug 2019 14:57:14 +0000 (07:57 -0700)
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 <koulihong@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/segment.c

index a1ece0caad78861dcac81aad4ab60e6ce9556d03..6aec63f0523b1d32d00d05e0bd056bda8d706b62 100644 (file)
@@ -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;
        }