From: Jaegeuk Kim Date: Wed, 16 Nov 2016 23:09:48 +0000 (-0800) Subject: f2fs: do not recover i_size if it's valid X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3a3a5ead7b6d2c9a29f493791ba23f264052db34;p=linux-beck.git f2fs: do not recover i_size if it's valid 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 --- diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c index 62523b217571..687c176f0b56 100644 --- a/fs/f2fs/recovery.c +++ b/fs/f2fs/recovery.c @@ -425,7 +425,7 @@ retry_dn: continue; } - if ((start + 1) << PAGE_SHIFT > i_size_read(inode)) + if (i_size_read(inode) <= (start << PAGE_SHIFT)) f2fs_i_size_write(inode, (start + 1) << PAGE_SHIFT); /*