From: Jaegeuk Kim Date: Thu, 5 Jun 2014 17:12:59 +0000 (+0900) Subject: f2fs: recover fallocated space X-Git-Tag: firefly_0821_release~176^2~3802^2~2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6fa1df533a93161c54c987bbffaadf03563aa78d;p=firefly-linux-kernel-4.4.55.git f2fs: recover fallocated space If a fallocated file is fsynced, we should recover the i_size after sudden power cut. Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index d97e5c458f36..78110dab5681 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -682,6 +682,7 @@ static int expand_inode_data(struct inode *inode, loff_t offset, i_size_read(inode) < new_size) { i_size_write(inode, new_size); mark_inode_dirty(inode); + f2fs_write_inode(inode, NULL); } return ret;