linux/fs/f2fs
Jaegeuk Kim 924a2ddbd0 f2fs: fix the potential mismatch between dir's i_size and i_blocks
This is the erroneous scenario.

                             i_size    on-disk i_size    i_blocks
__f2fs_add_link()             4096           4096           2
 get_new_data_page            8192           4096           3
 -ENOSPC = init_inode_metadata
 checkpoint                     -            4096           3
 POR and reboot

__f2fs_add_link()             4096           4096           3
 page = get_new_data_page (page->index = 1 by NEW_ADDR)
 add a dentry to the page successfully

f2fs_rmdir()
 f2fs_empty_dir()             4096           4096           3
 f2fs_unlink() goes, since there is no valid dentry due to i_size = 4096.
 But, still there is one dentry in page->index = 1.

So this patch moves the code to write dir->i_size into on-disk i_size in order
to sync dir's i_size, on-disk i_size, and its i_blocks.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2014-02-17 14:58:52 +09:00
..
Kconfig f2fs: introduce CONFIG_F2FS_CHECK_FS for BUG_ON control 2013-10-29 15:43:01 +09:00
Makefile f2fs: key functions to handle inline data 2013-12-26 20:40:09 +09:00
acl.c f2fs: use generic posix ACL infrastructure 2014-01-25 23:58:19 -05:00
acl.h f2fs: use generic posix ACL infrastructure 2014-01-25 23:58:19 -05:00
checkpoint.c f2fs: introduce NODE_MAPPING for code consistency 2014-01-22 18:41:08 +09:00
data.c f2fs: remove the ugly pointer conversion 2014-02-17 14:58:52 +09:00
debug.c f2fs: introduce NODE_MAPPING for code consistency 2014-01-22 18:41:08 +09:00
dir.c f2fs: fix the potential mismatch between dir's i_size and i_blocks 2014-02-17 14:58:52 +09:00
f2fs.h f2fs: remove the ugly pointer conversion 2014-02-17 14:58:52 +09:00
file.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2014-01-28 08:38:04 -08:00
gc.c f2fs: remove the needless parameter of f2fs_wait_on_page_writeback 2014-01-14 17:45:54 +09:00
gc.h f2fs: add a sysfs entry to control max_victim_search 2014-01-08 13:45:08 +09:00
hash.c f2fs: unify string length declarations and usage 2012-12-28 11:27:53 +09:00
inline.c f2fs: remove the needless parameter of f2fs_wait_on_page_writeback 2014-01-14 17:45:54 +09:00
inode.c f2fs: update_inode_page should be done all the time 2014-02-17 14:58:51 +09:00
namei.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2014-01-28 08:38:04 -08:00
node.c f2fs: fix to recover xattr node block 2014-02-17 14:58:52 +09:00
node.h f2fs: update several comments 2013-12-23 10:26:03 +09:00
recovery.c f2fs: fix to recover xattr node block 2014-02-17 14:58:52 +09:00
segment.c f2fs: handle dirty segments inside refresh_sit_entry 2014-02-17 14:58:52 +09:00
segment.h f2fs: clean checkpatch warnings 2014-01-20 10:27:12 +09:00
super.c f2fs: clean checkpatch warnings 2014-01-20 10:27:12 +09:00
xattr.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2014-01-28 08:38:04 -08:00
xattr.h f2fs: use generic posix ACL infrastructure 2014-01-25 23:58:19 -05:00