android_kernel_motorola_sm6225/fs/f2fs
Jaegeuk Kim a8865372a8 f2fs: handle errors correctly during f2fs_reserve_block
The get_dnode_of_data nullifies inode and node page when error is occurred.

There are two cases that passes inode page into get_dnode_of_data().

1. make_empty_dir()
    -> get_new_data_page()
      -> f2fs_reserve_block(ipage)
	-> get_dnode_of_data()

2. f2fs_convert_inline_data()
    -> __f2fs_convert_inline_data()
      -> f2fs_reserve_block(ipage)
	-> get_dnode_of_data()

This patch adds correct error handling codes when get_dnode_of_data() returns
an error.

At first, f2fs_reserve_block() calls f2fs_put_dnode() whenever reserve_new_block
returns an error.
So, the rule of f2fs_reserve_block() is to nullify inode page when there is any
error internally.

Finally, two callers of f2fs_reserve_block() should call f2fs_put_dnode()
appropriately if they got an error since successful f2fs_reserve_block().

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2014-01-06 16:42:21 +09:00
..
acl.c f2fs: fix a deadlock during init_acl procedure 2013-10-28 13:39:09 +09:00
acl.h f2fs: fix a deadlock during init_acl procedure 2013-10-28 13:39:09 +09:00
checkpoint.c f2fs: convert max_orphans to a field of f2fs_sb_info 2013-12-26 20:37:52 +09:00
data.c f2fs: handle errors correctly during f2fs_reserve_block 2014-01-06 16:42:21 +09:00
debug.c f2fs: add the number of inline_data files to status info 2014-01-06 16:42:20 +09:00
dir.c f2fs: handle errors correctly during f2fs_reserve_block 2014-01-06 16:42:21 +09:00
f2fs.h f2fs: add inline_data recovery routine 2014-01-06 16:42:20 +09:00
file.c f2fs: add inline_data recovery routine 2014-01-06 16:42:20 +09:00
gc.c f2fs: remove the rw_flag domain from f2fs_io_info 2013-12-23 10:18:07 +09:00
gc.h f2fs: optimize gc for better performance 2013-09-05 13:50:32 +09:00
hash.c f2fs: unify string length declarations and usage 2012-12-28 11:27:53 +09:00
inline.c f2fs: handle errors correctly during f2fs_reserve_block 2014-01-06 16:42:21 +09:00
inode.c f2fs: add the number of inline_data files to status info 2014-01-06 16:42:20 +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
namei.c f2fs: avoid to set wrong pino of inode when rename dir 2013-12-23 10:42:51 +09:00
node.c f2fs: introduce F2FS_INODE macro to get f2fs_inode 2013-12-26 20:32:48 +09:00
node.h f2fs: update several comments 2013-12-23 10:26:03 +09:00
recovery.c f2fs: add inline_data recovery routine 2014-01-06 16:42:20 +09:00
segment.c f2fs: remove the rw_flag domain from f2fs_io_info 2013-12-23 10:18:07 +09:00
segment.h f2fs: introduce sysfs entry to control in-place-update policy 2013-12-23 10:18:07 +09:00
super.c f2fs: introduce sysfs entry to control in-place-update policy 2013-12-23 10:18:07 +09:00
xattr.c f2fs: add unlikely() macro for compiler more aggressively 2013-12-23 10:18:06 +09:00
xattr.h f2fs: support the inline xattrs 2013-08-26 20:15:23 +09:00