summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/inline.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2014-04-29 17:35:10 +0900
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2014-05-07 10:21:58 +0900
commit9ac1349ad7e57013d6aa171cb014ad4166a1b50c (patch)
treeb59541c6af624cc1ad606874f6289636daeb8356 /fs/f2fs/inline.c
parent54b591dfda1f5ab0bc2a9ce1bee5364110168777 (diff)
downloadlinux-9ac1349ad7e57013d6aa171cb014ad4166a1b50c.tar.bz2
f2fs: avoid grab_cache_page_write_begin for data pages
We don't need to wait on page writeback for these cases. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/inline.c')
-rw-r--r--fs/f2fs/inline.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
index 8bf34f052f67..1bba5228c197 100644
--- a/fs/f2fs/inline.c
+++ b/fs/f2fs/inline.c
@@ -95,6 +95,7 @@ static int __f2fs_convert_inline_data(struct inode *inode, struct page *page)
if (err)
goto out;
+ f2fs_wait_on_page_writeback(page, DATA);
zero_user_segment(page, MAX_INLINE_DATA, PAGE_CACHE_SIZE);
/* Copy the whole inline data block */
@@ -133,7 +134,7 @@ int f2fs_convert_inline_data(struct inode *inode, pgoff_t to_size)
else if (to_size <= MAX_INLINE_DATA)
return 0;
- page = grab_cache_page_write_begin(inode->i_mapping, 0, AOP_FLAG_NOFS);
+ page = grab_cache_page(inode->i_mapping, 0);
if (!page)
return -ENOMEM;