Commit 300e129c authored by Jaegeuk Kim's avatar Jaegeuk Kim

f2fs: use f2fs_grab_cache_page instead of grab_cache_page

This patch converts grab_cache_page to f2fs_grab_cache_page.
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 0414b004
...@@ -34,7 +34,7 @@ struct page *grab_meta_page(struct f2fs_sb_info *sbi, pgoff_t index) ...@@ -34,7 +34,7 @@ struct page *grab_meta_page(struct f2fs_sb_info *sbi, pgoff_t index)
struct address_space *mapping = META_MAPPING(sbi); struct address_space *mapping = META_MAPPING(sbi);
struct page *page = NULL; struct page *page = NULL;
repeat: repeat:
page = grab_cache_page(mapping, index); page = f2fs_grab_cache_page(mapping, index, false);
if (!page) { if (!page) {
cond_resched(); cond_resched();
goto repeat; goto repeat;
...@@ -64,7 +64,7 @@ static struct page *__get_meta_page(struct f2fs_sb_info *sbi, pgoff_t index, ...@@ -64,7 +64,7 @@ static struct page *__get_meta_page(struct f2fs_sb_info *sbi, pgoff_t index,
if (unlikely(!is_meta)) if (unlikely(!is_meta))
fio.rw &= ~REQ_META; fio.rw &= ~REQ_META;
repeat: repeat:
page = grab_cache_page(mapping, index); page = f2fs_grab_cache_page(mapping, index, false);
if (!page) { if (!page) {
cond_resched(); cond_resched();
goto repeat; goto repeat;
...@@ -186,7 +186,8 @@ int ra_meta_pages(struct f2fs_sb_info *sbi, block_t start, int nrpages, ...@@ -186,7 +186,8 @@ int ra_meta_pages(struct f2fs_sb_info *sbi, block_t start, int nrpages,
BUG(); BUG();
} }
page = grab_cache_page(META_MAPPING(sbi), fio.new_blkaddr); page = f2fs_grab_cache_page(META_MAPPING(sbi),
fio.new_blkaddr, false);
if (!page) if (!page)
continue; continue;
if (PageUptodate(page)) { if (PageUptodate(page)) {
......
...@@ -161,7 +161,7 @@ int f2fs_convert_inline_inode(struct inode *inode) ...@@ -161,7 +161,7 @@ int f2fs_convert_inline_inode(struct inode *inode)
if (!f2fs_has_inline_data(inode)) if (!f2fs_has_inline_data(inode))
return 0; return 0;
page = grab_cache_page(inode->i_mapping, 0); page = f2fs_grab_cache_page(inode->i_mapping, 0, false);
if (!page) if (!page)
return -ENOMEM; return -ENOMEM;
...@@ -358,7 +358,7 @@ static int f2fs_move_inline_dirents(struct inode *dir, struct page *ipage, ...@@ -358,7 +358,7 @@ static int f2fs_move_inline_dirents(struct inode *dir, struct page *ipage,
struct f2fs_dentry_block *dentry_blk; struct f2fs_dentry_block *dentry_blk;
int err; int err;
page = grab_cache_page(dir->i_mapping, 0); page = f2fs_grab_cache_page(dir->i_mapping, 0, false);
if (!page) { if (!page) {
f2fs_put_page(ipage, 1); f2fs_put_page(ipage, 1);
return -ENOMEM; return -ENOMEM;
......
...@@ -995,7 +995,7 @@ struct page *new_node_page(struct dnode_of_data *dn, ...@@ -995,7 +995,7 @@ struct page *new_node_page(struct dnode_of_data *dn,
if (unlikely(is_inode_flag_set(F2FS_I(dn->inode), FI_NO_ALLOC))) if (unlikely(is_inode_flag_set(F2FS_I(dn->inode), FI_NO_ALLOC)))
return ERR_PTR(-EPERM); return ERR_PTR(-EPERM);
page = grab_cache_page(NODE_MAPPING(sbi), dn->nid); page = f2fs_grab_cache_page(NODE_MAPPING(sbi), dn->nid, false);
if (!page) if (!page)
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
...@@ -1087,7 +1087,7 @@ void ra_node_page(struct f2fs_sb_info *sbi, nid_t nid) ...@@ -1087,7 +1087,7 @@ void ra_node_page(struct f2fs_sb_info *sbi, nid_t nid)
if (apage) if (apage)
return; return;
apage = grab_cache_page(NODE_MAPPING(sbi), nid); apage = f2fs_grab_cache_page(NODE_MAPPING(sbi), nid, false);
if (!apage) if (!apage)
return; return;
...@@ -1128,7 +1128,7 @@ static struct page *__get_node_page(struct f2fs_sb_info *sbi, pgoff_t nid, ...@@ -1128,7 +1128,7 @@ static struct page *__get_node_page(struct f2fs_sb_info *sbi, pgoff_t nid,
return ERR_PTR(-ENOENT); return ERR_PTR(-ENOENT);
f2fs_bug_on(sbi, check_nid_range(sbi, nid)); f2fs_bug_on(sbi, check_nid_range(sbi, nid));
repeat: repeat:
page = grab_cache_page(NODE_MAPPING(sbi), nid); page = f2fs_grab_cache_page(NODE_MAPPING(sbi), nid, false);
if (!page) if (!page)
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
...@@ -2012,7 +2012,7 @@ int recover_inode_page(struct f2fs_sb_info *sbi, struct page *page) ...@@ -2012,7 +2012,7 @@ int recover_inode_page(struct f2fs_sb_info *sbi, struct page *page)
if (unlikely(old_ni.blk_addr != NULL_ADDR)) if (unlikely(old_ni.blk_addr != NULL_ADDR))
return -EINVAL; return -EINVAL;
ipage = grab_cache_page(NODE_MAPPING(sbi), ino); ipage = f2fs_grab_cache_page(NODE_MAPPING(sbi), ino, false);
if (!ipage) if (!ipage)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment