Skip to content

Commit

Permalink
f2fs: recover fallocated space
Browse files Browse the repository at this point in the history
If a fallocated file is fsynced, we should recover the i_size after sudden
power cut.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
  • Loading branch information
Jaegeuk Kim committed Jun 6, 2014
1 parent b6fe587 commit 6fa1df5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/f2fs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6fa1df5

Please sign in to comment.