diff options
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r-- | fs/f2fs/node.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index d3d90d284631..1f3329907483 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c | |||
@@ -237,7 +237,7 @@ retry: | |||
237 | nat_get_blkaddr(e) != NULL_ADDR && | 237 | nat_get_blkaddr(e) != NULL_ADDR && |
238 | new_blkaddr == NEW_ADDR); | 238 | new_blkaddr == NEW_ADDR); |
239 | 239 | ||
240 | /* increament version no as node is removed */ | 240 | /* increment version no as node is removed */ |
241 | if (nat_get_blkaddr(e) != NEW_ADDR && new_blkaddr == NULL_ADDR) { | 241 | if (nat_get_blkaddr(e) != NEW_ADDR && new_blkaddr == NULL_ADDR) { |
242 | unsigned char version = nat_get_version(e); | 242 | unsigned char version = nat_get_version(e); |
243 | nat_set_version(e, inc_node_version(version)); | 243 | nat_set_version(e, inc_node_version(version)); |
@@ -274,7 +274,7 @@ int try_to_free_nats(struct f2fs_sb_info *sbi, int nr_shrink) | |||
274 | } | 274 | } |
275 | 275 | ||
276 | /* | 276 | /* |
277 | * This function returns always success | 277 | * This function always returns success |
278 | */ | 278 | */ |
279 | void get_node_info(struct f2fs_sb_info *sbi, nid_t nid, struct node_info *ni) | 279 | void get_node_info(struct f2fs_sb_info *sbi, nid_t nid, struct node_info *ni) |
280 | { | 280 | { |
@@ -650,7 +650,7 @@ static int truncate_partial_nodes(struct dnode_of_data *dn, | |||
650 | 650 | ||
651 | /* get indirect nodes in the path */ | 651 | /* get indirect nodes in the path */ |
652 | for (i = 0; i < idx + 1; i++) { | 652 | for (i = 0; i < idx + 1; i++) { |
653 | /* refernece count'll be increased */ | 653 | /* reference count'll be increased */ |
654 | pages[i] = get_node_page(sbi, nid[i]); | 654 | pages[i] = get_node_page(sbi, nid[i]); |
655 | if (IS_ERR(pages[i])) { | 655 | if (IS_ERR(pages[i])) { |
656 | err = PTR_ERR(pages[i]); | 656 | err = PTR_ERR(pages[i]); |
@@ -836,7 +836,7 @@ void remove_inode_page(struct inode *inode) | |||
836 | f2fs_put_page(page, 1); | 836 | f2fs_put_page(page, 1); |
837 | return; | 837 | return; |
838 | } | 838 | } |
839 | /* 0 is possible, after f2fs_new_inode() is failed */ | 839 | /* 0 is possible, after f2fs_new_inode() has failed */ |
840 | f2fs_bug_on(inode->i_blocks != 0 && inode->i_blocks != 1); | 840 | f2fs_bug_on(inode->i_blocks != 0 && inode->i_blocks != 1); |
841 | set_new_dnode(&dn, inode, page, page, ino); | 841 | set_new_dnode(&dn, inode, page, page, ino); |
842 | truncate_node(&dn); | 842 | truncate_node(&dn); |
@@ -1637,7 +1637,7 @@ int recover_inode_page(struct f2fs_sb_info *sbi, struct page *page) | |||
1637 | if (!ipage) | 1637 | if (!ipage) |
1638 | return -ENOMEM; | 1638 | return -ENOMEM; |
1639 | 1639 | ||
1640 | /* Should not use this inode from free nid list */ | 1640 | /* Should not use this inode from free nid list */ |
1641 | remove_free_nid(NM_I(sbi), ino); | 1641 | remove_free_nid(NM_I(sbi), ino); |
1642 | 1642 | ||
1643 | SetPageUptodate(ipage); | 1643 | SetPageUptodate(ipage); |
@@ -1665,7 +1665,7 @@ int recover_inode_page(struct f2fs_sb_info *sbi, struct page *page) | |||
1665 | 1665 | ||
1666 | /* | 1666 | /* |
1667 | * ra_sum_pages() merge contiguous pages into one bio and submit. | 1667 | * ra_sum_pages() merge contiguous pages into one bio and submit. |
1668 | * these pre-readed pages are alloced in bd_inode's mapping tree. | 1668 | * these pre-read pages are allocated in bd_inode's mapping tree. |
1669 | */ | 1669 | */ |
1670 | static int ra_sum_pages(struct f2fs_sb_info *sbi, struct page **pages, | 1670 | static int ra_sum_pages(struct f2fs_sb_info *sbi, struct page **pages, |
1671 | int start, int nrpages) | 1671 | int start, int nrpages) |
@@ -1709,7 +1709,7 @@ int restore_node_summary(struct f2fs_sb_info *sbi, | |||
1709 | for (i = 0; !err && i < last_offset; i += nrpages, addr += nrpages) { | 1709 | for (i = 0; !err && i < last_offset; i += nrpages, addr += nrpages) { |
1710 | nrpages = min(last_offset - i, bio_blocks); | 1710 | nrpages = min(last_offset - i, bio_blocks); |
1711 | 1711 | ||
1712 | /* read ahead node pages */ | 1712 | /* readahead node pages */ |
1713 | nrpages = ra_sum_pages(sbi, pages, addr, nrpages); | 1713 | nrpages = ra_sum_pages(sbi, pages, addr, nrpages); |
1714 | if (!nrpages) | 1714 | if (!nrpages) |
1715 | return -ENOMEM; | 1715 | return -ENOMEM; |