Skip to content

Commit 65bdf69

Browse files
Jaegeuk Kimpundiramit
authored andcommitted
f2fs: do not recover i_size if it's valid
commit 3a3a5ead7b6d2c9a29f493791ba23f264052db34 upstream. If i_size is already valid during roll_forward recovery, we should not update it according to the block alignment. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
1 parent 8cc3e39 commit 65bdf69

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/f2fs/recovery.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ static int do_recover_data(struct f2fs_sb_info *sbi, struct inode *inode,
425425
continue;
426426
}
427427

428-
if ((start + 1) << PAGE_SHIFT > i_size_read(inode))
428+
if (i_size_read(inode) <= (start << PAGE_SHIFT))
429429
f2fs_i_size_write(inode, (start + 1) << PAGE_SHIFT);
430430

431431
/*

0 commit comments

Comments
 (0)