summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2016-11-16 15:09:48 -0800
committerJaegeuk Kim <jaegeuk@kernel.org>2016-11-25 10:16:04 -0800
commit3a3a5ead7b6d2c9a29f493791ba23f264052db34 (patch)
tree0f619d356b762d52b0919f3f45b3faedc7f6a01c
parent281518c694a5228d6c46fac83529fb3e2c331281 (diff)
downloadop-kernel-dev-3a3a5ead7b6d2c9a29f493791ba23f264052db34.zip
op-kernel-dev-3a3a5ead7b6d2c9a29f493791ba23f264052db34.tar.gz
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 <jaegeuk@kernel.org>
-rw-r--r--fs/f2fs/recovery.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index 62523b2..687c176 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);
/*
OpenPOWER on IntegriCloud