aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorChao Yu <chao2.yu@samsung.com>2014-03-17 16:36:24 +0800
committerAndreas Blaesius <skate4life@gmx.de>2016-06-05 21:21:21 +0200
commitb5f4d51ec423cbea0ff66328bf9710e18ac54ac3 (patch)
treecf6a348ad37014f7c0d7c345fa888c0903d8436b /fs/f2fs
parent965d32066e52bf14b97ab22f57966a94d952e6a1 (diff)
downloadkernel_samsung_espresso10-b5f4d51ec423cbea0ff66328bf9710e18ac54ac3.zip
kernel_samsung_espresso10-b5f4d51ec423cbea0ff66328bf9710e18ac54ac3.tar.gz
kernel_samsung_espresso10-b5f4d51ec423cbea0ff66328bf9710e18ac54ac3.tar.bz2
f2fs: avoid to return incorrect errno of read_normal_summaries
We should return error number of read_normal_summaries instead of -EINVAL when read_normal_summaries failed. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs')
-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 b3f8431..6c5a4f0 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)
static int restore_curseg_summaries(struct f2fs_sb_info *sbi)
{
int type = CURSEG_HOT_DATA;
+ int err;
if (is_set_ckpt_flags(F2FS_CKPT(sbi), CP_COMPACT_SUM_FLAG)) {
/* restore for compacted data summary */
@@ -1194,9 +1195,12 @@ static int restore_curseg_summaries(struct f2fs_sb_info *sbi)
type = CURSEG_HOT_NODE;
}
- for (; type <= CURSEG_COLD_NODE; type++)
- if (read_normal_summaries(sbi, type))
- return -EINVAL;
+ for (; type <= CURSEG_COLD_NODE; type++) {
+ err = read_normal_summaries(sbi, type);
+ if (err)
+ return err;
+ }
+
return 0;
}