Searched hist:"470 f00e9686f0b338a457568229fe7b7d44b8e6a" (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/fs/f2fs/ |
H A D | inline.c | diff 470f00e9686f0b338a457568229fe7b7d44b8e6a Tue Jul 14 05:14:06 CDT 2015 Chao Yu <chao2.yu@samsung.com> f2fs: fix to release inode page correctly
In following call path, we will pass a locked and referenced ipage pointer to get_new_data_page: - init_inode_metadata - make_empty_dir - get_new_data_page
There are two exit paths in get_new_data_page when error occurs: 1) grab_cache_page fails, ipage will not be released; 2) f2fs_reserve_block fails, ipage will be released in callee.
So, it's not consistent for error handling in get_new_data_page.
For f2fs_reserve_block, it's not very easy to change the rule of error handling, since it's already complicated.
Here we deside to choose an easy way to fix this issue: If any error occur in get_new_data_page, we will ensure releasing ipage in this function.
The same issue is in f2fs_convert_inline_dir, fix that too.
Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|
H A D | data.c | diff 470f00e9686f0b338a457568229fe7b7d44b8e6a Tue Jul 14 05:14:06 CDT 2015 Chao Yu <chao2.yu@samsung.com> f2fs: fix to release inode page correctly
In following call path, we will pass a locked and referenced ipage pointer to get_new_data_page: - init_inode_metadata - make_empty_dir - get_new_data_page
There are two exit paths in get_new_data_page when error occurs: 1) grab_cache_page fails, ipage will not be released; 2) f2fs_reserve_block fails, ipage will be released in callee.
So, it's not consistent for error handling in get_new_data_page.
For f2fs_reserve_block, it's not very easy to change the rule of error handling, since it's already complicated.
Here we deside to choose an easy way to fix this issue: If any error occur in get_new_data_page, we will ensure releasing ipage in this function.
The same issue is in f2fs_convert_inline_dir, fix that too.
Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
|