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>
This commit is contained in:
Jaegeuk Kim
2014-04-29 17:35:10 +09:00
parent 54b591dfda
commit 9ac1349ad7
2 changed files with 4 additions and 3 deletions

View File

@@ -417,7 +417,7 @@ struct page *find_data_page(struct inode *inode, pgoff_t index, bool sync)
if (unlikely(dn.data_blkaddr == NEW_ADDR))
return ERR_PTR(-EINVAL);
page = grab_cache_page_write_begin(mapping, index, AOP_FLAG_NOFS);
page = grab_cache_page(mapping, index);
if (!page)
return ERR_PTR(-ENOMEM);
@@ -455,7 +455,7 @@ struct page *get_lock_data_page(struct inode *inode, pgoff_t index)
int err;
repeat:
page = grab_cache_page_write_begin(mapping, index, AOP_FLAG_NOFS);
page = grab_cache_page(mapping, index);
if (!page)
return ERR_PTR(-ENOMEM);