fsck.f2fs: drop extent_info to avoid potential wrong access
authorJaegeuk Kim <jaegeuk@kernel.org>
Thu, 2 Jul 2015 01:37:48 +0000 (18:37 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 2 Jul 2015 01:54:00 +0000 (18:54 -0700)
This patch avoids wrong extent information modified by fixing block addresses.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fsck/fsck.c

index bbd4cab..70efce6 100644 (file)
@@ -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);
        }