diff options
author | Lihong Kou <koulihong@huawei.com> | 2019-08-05 07:13:52 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2019-08-23 10:57:14 -0400 |
commit | 290c30d4454ccf85de372af499e32e86f5d94188 (patch) | |
tree | 7f912143e9d56302a69bb4aede1f263d9cb97070 | |
parent | 27cae0bcc0510ba009f01806b4af13940ad96f7d (diff) |
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 <koulihong@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r-- | fs/f2fs/segment.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index a1ece0caad78..6aec63f0523b 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) | |||
4168 | if (start >= MAIN_SEGS(sbi)) { | 4168 | if (start >= MAIN_SEGS(sbi)) { |
4169 | f2fs_err(sbi, "Wrong journal entry on segno %u", | 4169 | f2fs_err(sbi, "Wrong journal entry on segno %u", |
4170 | start); | 4170 | start); |
4171 | set_sbi_flag(sbi, SBI_NEED_FSCK); | ||
4172 | err = -EFSCORRUPTED; | 4171 | err = -EFSCORRUPTED; |
4173 | break; | 4172 | break; |
4174 | } | 4173 | } |
@@ -4208,7 +4207,6 @@ static int build_sit_entries(struct f2fs_sb_info *sbi) | |||
4208 | if (!err && total_node_blocks != valid_node_count(sbi)) { | 4207 | if (!err && total_node_blocks != valid_node_count(sbi)) { |
4209 | f2fs_err(sbi, "SIT is corrupted node# %u vs %u", | 4208 | f2fs_err(sbi, "SIT is corrupted node# %u vs %u", |
4210 | total_node_blocks, valid_node_count(sbi)); | 4209 | total_node_blocks, valid_node_count(sbi)); |
4211 | set_sbi_flag(sbi, SBI_NEED_FSCK); | ||
4212 | err = -EFSCORRUPTED; | 4210 | err = -EFSCORRUPTED; |
4213 | } | 4211 | } |
4214 | 4212 | ||