aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/f2fs/segment.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index b3f84318b7ed..6c5a4f0218ca 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -1186,6 +1186,7 @@ static int read_normal_summaries(struct f2fs_sb_info *sbi, int type)
1186static int restore_curseg_summaries(struct f2fs_sb_info *sbi) 1186static int restore_curseg_summaries(struct f2fs_sb_info *sbi)
1187{ 1187{
1188 int type = CURSEG_HOT_DATA; 1188 int type = CURSEG_HOT_DATA;
1189 int err;
1189 1190
1190 if (is_set_ckpt_flags(F2FS_CKPT(sbi), CP_COMPACT_SUM_FLAG)) { 1191 if (is_set_ckpt_flags(F2FS_CKPT(sbi), CP_COMPACT_SUM_FLAG)) {
1191 /* restore for compacted data summary */ 1192 /* restore for compacted data summary */
@@ -1194,9 +1195,12 @@ static int restore_curseg_summaries(struct f2fs_sb_info *sbi)
1194 type = CURSEG_HOT_NODE; 1195 type = CURSEG_HOT_NODE;
1195 } 1196 }
1196 1197
1197 for (; type <= CURSEG_COLD_NODE; type++) 1198 for (; type <= CURSEG_COLD_NODE; type++) {
1198 if (read_normal_summaries(sbi, type)) 1199 err = read_normal_summaries(sbi, type);
1199 return -EINVAL; 1200 if (err)
1201 return err;
1202 }
1203
1200 return 0; 1204 return 0;
1201} 1205}
1202 1206