f2fs: call update_inode_page for orphan inodes
Let's store orphan inode pages right away. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
@ -508,10 +508,11 @@ void release_orphan_inode(struct f2fs_sb_info *sbi)
|
||||
spin_unlock(&im->ino_lock);
|
||||
}
|
||||
|
||||
void add_orphan_inode(struct f2fs_sb_info *sbi, nid_t ino)
|
||||
void add_orphan_inode(struct inode *inode)
|
||||
{
|
||||
/* add new orphan ino entry into list */
|
||||
__add_ino_entry(sbi, ino, ORPHAN_INO);
|
||||
__add_ino_entry(F2FS_I_SB(inode), inode->i_ino, ORPHAN_INO);
|
||||
update_inode_page(inode);
|
||||
}
|
||||
|
||||
void remove_orphan_inode(struct f2fs_sb_info *sbi, nid_t ino)
|
||||
@ -535,7 +536,6 @@ static int recover_orphan_inode(struct f2fs_sb_info *sbi, nid_t ino)
|
||||
}
|
||||
|
||||
clear_nlink(inode);
|
||||
mark_inode_dirty_sync(inode);
|
||||
|
||||
/* truncate all the data during iput */
|
||||
iput(inode);
|
||||
|
Reference in New Issue
Block a user