aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2015-07-01 18:37:48 -0700
committerDan Pasanen <dan.pasanen@gmail.com>2015-11-12 09:37:25 -0600
commit2dd3654c402cab2f8be67c470750b8aaa391b181 (patch)
tree9b95af2b3a9c250ab89e2087da4819eb39ae98dc
parent8913b3f0328686adb52ae3d94cefa2a6c48c2466 (diff)
downloadandroid_external_f2fs-tools-2dd3654c402cab2f8be67c470750b8aaa391b181.tar.gz
android_external_f2fs-tools-2dd3654c402cab2f8be67c470750b8aaa391b181.tar.bz2
android_external_f2fs-tools-2dd3654c402cab2f8be67c470750b8aaa391b181.zip
fsck.f2fs: drop extent_info to avoid potential wrong access
This patch avoids wrong extent information modified by fixing block addresses. Change-Id: I33fca48aa307dee9cf4829a935f301949bc879c4 Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r--fsck/fsck.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fsck/fsck.c b/fsck/fsck.c
index bbd4cab..70efce6 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -722,6 +722,8 @@ skip_blkcnt_fix:
}
}
if (need_fix) {
+ /* drop extent information to avoid potential wrong access */
+ node_blk->i.i_ext.len = 0;
ret = dev_write_block(node_blk, ni->blk_addr);
ASSERT(ret >= 0);
}