diff options
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r-- | fs/f2fs/node.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 5e9c38e846a5..9a6d8bbf0bd7 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c | |||
@@ -725,7 +725,7 @@ skip_partial: | |||
725 | f2fs_put_page(page, 1); | 725 | f2fs_put_page(page, 1); |
726 | goto restart; | 726 | goto restart; |
727 | } | 727 | } |
728 | wait_on_page_writeback(page); | 728 | f2fs_wait_on_page_writeback(page, NODE); |
729 | ri->i_nid[offset[0] - NODE_DIR1_BLOCK] = 0; | 729 | ri->i_nid[offset[0] - NODE_DIR1_BLOCK] = 0; |
730 | set_page_dirty(page); | 730 | set_page_dirty(page); |
731 | unlock_page(page); | 731 | unlock_page(page); |
@@ -814,7 +814,8 @@ struct page *new_node_page(struct dnode_of_data *dn, | |||
814 | if (unlikely(is_inode_flag_set(F2FS_I(dn->inode), FI_NO_ALLOC))) | 814 | if (unlikely(is_inode_flag_set(F2FS_I(dn->inode), FI_NO_ALLOC))) |
815 | return ERR_PTR(-EPERM); | 815 | return ERR_PTR(-EPERM); |
816 | 816 | ||
817 | page = grab_cache_page(NODE_MAPPING(sbi), dn->nid); | 817 | page = grab_cache_page_write_begin(NODE_MAPPING(sbi), |
818 | dn->nid, AOP_FLAG_NOFS); | ||
818 | if (!page) | 819 | if (!page) |
819 | return ERR_PTR(-ENOMEM); | 820 | return ERR_PTR(-ENOMEM); |
820 | 821 | ||
@@ -910,7 +911,8 @@ struct page *get_node_page(struct f2fs_sb_info *sbi, pgoff_t nid) | |||
910 | struct page *page; | 911 | struct page *page; |
911 | int err; | 912 | int err; |
912 | repeat: | 913 | repeat: |
913 | page = grab_cache_page(NODE_MAPPING(sbi), nid); | 914 | page = grab_cache_page_write_begin(NODE_MAPPING(sbi), |
915 | nid, AOP_FLAG_NOFS); | ||
914 | if (!page) | 916 | if (!page) |
915 | return ERR_PTR(-ENOMEM); | 917 | return ERR_PTR(-ENOMEM); |
916 | 918 | ||
@@ -1130,7 +1132,7 @@ int wait_on_node_pages_writeback(struct f2fs_sb_info *sbi, nid_t ino) | |||
1130 | continue; | 1132 | continue; |
1131 | 1133 | ||
1132 | if (ino && ino_of_node(page) == ino) { | 1134 | if (ino && ino_of_node(page) == ino) { |
1133 | wait_on_page_writeback(page); | 1135 | f2fs_wait_on_page_writeback(page, NODE); |
1134 | if (TestClearPageError(page)) | 1136 | if (TestClearPageError(page)) |
1135 | ret = -EIO; | 1137 | ret = -EIO; |
1136 | } | 1138 | } |
@@ -1163,7 +1165,7 @@ static int f2fs_write_node_page(struct page *page, | |||
1163 | if (unlikely(sbi->por_doing)) | 1165 | if (unlikely(sbi->por_doing)) |
1164 | goto redirty_out; | 1166 | goto redirty_out; |
1165 | 1167 | ||
1166 | wait_on_page_writeback(page); | 1168 | f2fs_wait_on_page_writeback(page, NODE); |
1167 | 1169 | ||
1168 | /* get old block addr of this node page */ | 1170 | /* get old block addr of this node page */ |
1169 | nid = nid_of_node(page); | 1171 | nid = nid_of_node(page); |