diff options
author | Surbhi Palande <f2fsnewbie@gmail.com> | 2019-08-23 15:40:45 -0700 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2019-09-16 08:38:48 -0700 |
commit | 1166c1f2f69117ad254189ca781287afa6e550b6 (patch) | |
tree | 1f1251fd68987f918eba6bd4d2896bda163292dc /fs/f2fs | |
parent | bd7253bc5eee11877d963453dc5812e99d26c317 (diff) | |
download | linux-1166c1f2f69117ad254189ca781287afa6e550b6.tar.bz2 |
f2fs: check all the data segments against all node ones
As a part of the sanity checking while mounting, distinct segment number
assignment to data and node segments is verified. Fixing a small bug in
this verification between node and data segments. We need to check all
the data segments with all the node segments.
Fixes: 042be0f849e5f ("f2fs: fix to do sanity check with current segment number")
Signed-off-by: Surbhi Palande <csurbhi@gmail.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/super.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 46d10a94721d..04788a6f9bcf 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -2738,10 +2738,10 @@ int f2fs_sanity_check_ckpt(struct f2fs_sb_info *sbi) } } for (i = 0; i < NR_CURSEG_NODE_TYPE; i++) { - for (j = i; j < NR_CURSEG_DATA_TYPE; j++) { + for (j = 0; j < NR_CURSEG_DATA_TYPE; j++) { if (le32_to_cpu(ckpt->cur_node_segno[i]) == le32_to_cpu(ckpt->cur_data_segno[j])) { - f2fs_err(sbi, "Data segment (%u) and Data segment (%u) has the same segno: %u", + f2fs_err(sbi, "Node segment (%u) and Data segment (%u) has the same segno: %u", i, j, le32_to_cpu(ckpt->cur_node_segno[i])); return 1; |