Skip to contentSkip to conversation

f2fs: cleanup the code in build_sit_entries.

PATCH In review Lihong Kou 2 participants 2 messages Aug 5, 2019 F2FS file system

lore
Share & tools
lore

Lihong Kou

author
#0 lore raw

PATCH 1/1 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.

---
 fs/f2fs/segment.c | 2 --
 1 file changed, 2 deletions(-)
fs/f2fs/segment.c +0 -2
index a661ac3..90e2579 100644
@@ -4161,7 +4161,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;
 		}
@@ -4201,7 +4200,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;
 	}
 
Signature · 1 line
2.7.4