Explorar o código

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 <jaegeuk@kernel.org>
Jaegeuk Kim %!s(int64=11) %!d(string=hai) anos
pai
achega
6fa1df533a
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      fs/f2fs/file.c

+ 1 - 0
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;