diff options
| -rw-r--r-- | fs/f2fs/f2fs.h | 1 | ||||
| -rw-r--r-- | fs/f2fs/node.c | 4 | ||||
| -rw-r--r-- | fs/f2fs/recovery.c | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 99425675c2f8..4dab5338a97a 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h | |||
| @@ -1204,6 +1204,7 @@ void alloc_nid_done(struct f2fs_sb_info *, nid_t); | |||
| 1204 | void alloc_nid_failed(struct f2fs_sb_info *, nid_t); | 1204 | void alloc_nid_failed(struct f2fs_sb_info *, nid_t); |
| 1205 | void recover_node_page(struct f2fs_sb_info *, struct page *, | 1205 | void recover_node_page(struct f2fs_sb_info *, struct page *, |
| 1206 | struct f2fs_summary *, struct node_info *, block_t); | 1206 | struct f2fs_summary *, struct node_info *, block_t); |
| 1207 | void recover_inline_xattr(struct inode *, struct page *); | ||
| 1207 | bool recover_xattr_data(struct inode *, struct page *, block_t); | 1208 | bool recover_xattr_data(struct inode *, struct page *, block_t); |
| 1208 | int recover_inode_page(struct f2fs_sb_info *, struct page *); | 1209 | int recover_inode_page(struct f2fs_sb_info *, struct page *); |
| 1209 | int restore_node_summary(struct f2fs_sb_info *, unsigned int, | 1210 | int restore_node_summary(struct f2fs_sb_info *, unsigned int, |
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 7b5b5def65fe..d3d90d284631 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c | |||
| @@ -1549,7 +1549,7 @@ void recover_node_page(struct f2fs_sb_info *sbi, struct page *page, | |||
| 1549 | clear_node_page_dirty(page); | 1549 | clear_node_page_dirty(page); |
| 1550 | } | 1550 | } |
| 1551 | 1551 | ||
| 1552 | static void recover_inline_xattr(struct inode *inode, struct page *page) | 1552 | void recover_inline_xattr(struct inode *inode, struct page *page) |
| 1553 | { | 1553 | { |
| 1554 | struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb); | 1554 | struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb); |
| 1555 | void *src_addr, *dst_addr; | 1555 | void *src_addr, *dst_addr; |
| @@ -1588,8 +1588,6 @@ bool recover_xattr_data(struct inode *inode, struct page *page, block_t blkaddr) | |||
| 1588 | nid_t new_xnid = nid_of_node(page); | 1588 | nid_t new_xnid = nid_of_node(page); |
| 1589 | struct node_info ni; | 1589 | struct node_info ni; |
| 1590 | 1590 | ||
| 1591 | recover_inline_xattr(inode, page); | ||
| 1592 | |||
| 1593 | if (!f2fs_has_xattr_block(ofs_of_node(page))) | 1591 | if (!f2fs_has_xattr_block(ofs_of_node(page))) |
| 1594 | return false; | 1592 | return false; |
| 1595 | 1593 | ||
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c index b2aa53b99f64..fe1c6d921ba2 100644 --- a/fs/f2fs/recovery.c +++ b/fs/f2fs/recovery.c | |||
| @@ -300,6 +300,8 @@ static int do_recover_data(struct f2fs_sb_info *sbi, struct inode *inode, | |||
| 300 | struct node_info ni; | 300 | struct node_info ni; |
| 301 | int err = 0, recovered = 0; | 301 | int err = 0, recovered = 0; |
| 302 | 302 | ||
| 303 | recover_inline_xattr(inode, page); | ||
| 304 | |||
| 303 | if (recover_inline_data(inode, page)) | 305 | if (recover_inline_data(inode, page)) |
| 304 | goto out; | 306 | goto out; |
| 305 | 307 | ||
