From 6fa1df533a93161c54c987bbffaadf03563aa78d Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Fri, 6 Jun 2014 02:12:59 +0900 Subject: 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 --- fs/f2fs/file.c | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/f2fs') diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index d97e5c4..78110da 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; -- cgit v1.1