f2fs: fix the initial inode page for recovery
If a new inode page is needed for recover_dentry, we should assing i_inline as zero. Reviewed-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Родитель
0342fd301a
Коммит
617deb8c05
|
@ -1651,6 +1651,7 @@ int recover_inode_page(struct f2fs_sb_info *sbi, struct page *page)
|
||||||
dst->i_blocks = cpu_to_le64(1);
|
dst->i_blocks = cpu_to_le64(1);
|
||||||
dst->i_links = cpu_to_le32(1);
|
dst->i_links = cpu_to_le32(1);
|
||||||
dst->i_xattr_nid = 0;
|
dst->i_xattr_nid = 0;
|
||||||
|
dst->i_inline = src->i_inline & F2FS_INLINE_XATTR;
|
||||||
|
|
||||||
new_ni = old_ni;
|
new_ni = old_ni;
|
||||||
new_ni.ino = ino;
|
new_ni.ino = ino;
|
||||||
|
@ -1659,6 +1660,7 @@ int recover_inode_page(struct f2fs_sb_info *sbi, struct page *page)
|
||||||
WARN_ON(1);
|
WARN_ON(1);
|
||||||
set_node_addr(sbi, &new_ni, NEW_ADDR, false);
|
set_node_addr(sbi, &new_ni, NEW_ADDR, false);
|
||||||
inc_valid_inode_count(sbi);
|
inc_valid_inode_count(sbi);
|
||||||
|
set_page_dirty(ipage);
|
||||||
f2fs_put_page(ipage, 1);
|
f2fs_put_page(ipage, 1);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче