From ca1436eeef10a23586c64491d308dd8c2e22174b Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Wed, 1 Jul 2015 18:37:48 -0700 Subject: [PATCH] fsck.f2fs: drop extent_info to avoid potential wrong access This patch avoids wrong extent information modified by fixing block addresses. Signed-off-by: Jaegeuk Kim --- fsck/fsck.c | 2 ++ 1 file changed, 2 insertions(+) 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); } -- 2.7.4