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:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user