]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: refactor f2fs_convert_inline_data
authorJaegeuk Kim <jaegeuk.kim@samsung.com>
Fri, 27 Dec 2013 03:28:59 +0000 (12:28 +0900)
committerJaegeuk Kim <jaegeuk.kim@samsung.com>
Mon, 6 Jan 2014 07:42:19 +0000 (16:42 +0900)
commitf7942af0e0d449389733582f1f568050c32e8a7e
tree85c3dddd41255d4ba8d83583f0550b1693338209
parentbdf43baf4193d940f0436dd0bcac665ee552622b
f2fs: refactor f2fs_convert_inline_data

Change log from v1:
 o handle NULL pointer of grab_cache_page_write_begin() pointed by Chao Yu.

This patch refactors f2fs_convert_inline_data to check a couple of conditions
internally for deciding whether it needs to convert inline_data or not.

So, the new f2fs_convert_inline_data initially checks:
1) f2fs_has_inline_data(), and
2) the data size to be changed.

If the inode has inline_data but the size to fill is less than MAX_INLINE_DATA,
then we don't need to convert the inline_data with data allocation.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
fs/f2fs/data.c
fs/f2fs/f2fs.h
fs/f2fs/file.c
fs/f2fs/inline.c