mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
f2fs: unify add/remove ino entry API for all ino types
- Call f2fs_add_ino_entry() and f2fs_remove_ino_entry() for ORPHAN_INO - introduce __f2fs_add_ino_entry() to wrap __add_ino_entry(), so that both f2fs_add_ino_entry() and f2fs_set_dirty_device() will call __f2fs_add_ino_entry(). So, after this change: add delete lookup ORPHAN_INO f2fs_add_ino_entry f2fs_remove_ino_entry N/A FLUSH_INO f2fs_set_dirty_device f2fs_remove_ino_entry f2fs_is_dirty_device APPEND_INO f2fs_add_ino_entry f2fs_remove_ino_entry f2fs_exist_written_data UPDATA_INO f2fs_add_ino_entry f2fs_remove_ino_entry f2fs_exist_written_data TRANS_DIR_INO f2fs_add_ino_entry N/A f2fs_exist_written_data XATTR_DIR_INO f2fs_add_ino_entry N/A f2fs_exist_written_data Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
5eced87b7d
commit
d3915a0a35
|
|
@ -775,10 +775,16 @@ static void f2fs_wait_for_inode_record(struct f2fs_sb_info *sbi, int mode)
|
|||
flush_workqueue(sbi->evict_wq);
|
||||
}
|
||||
|
||||
void f2fs_add_ino_entry(struct f2fs_sb_info *sbi, nid_t ino, int type)
|
||||
static void __f2fs_add_ino_entry(struct f2fs_sb_info *sbi, nid_t ino,
|
||||
unsigned int devidx, int type)
|
||||
{
|
||||
/* add new dirty ino entry into list */
|
||||
__add_ino_entry(sbi, ino, 0, type);
|
||||
__add_ino_entry(sbi, ino, devidx, type);
|
||||
}
|
||||
|
||||
void f2fs_add_ino_entry(struct f2fs_sb_info *sbi, nid_t ino, int type)
|
||||
{
|
||||
__f2fs_add_ino_entry(sbi, ino, 0, type);
|
||||
}
|
||||
|
||||
void f2fs_remove_ino_entry(struct f2fs_sb_info *sbi, nid_t ino, int type)
|
||||
|
|
@ -823,7 +829,7 @@ void f2fs_release_ino_entry(struct f2fs_sb_info *sbi, bool all)
|
|||
void f2fs_set_dirty_device(struct f2fs_sb_info *sbi, nid_t ino,
|
||||
unsigned int devidx, int type)
|
||||
{
|
||||
__add_ino_entry(sbi, ino, devidx, type);
|
||||
__f2fs_add_ino_entry(sbi, ino, devidx, type);
|
||||
}
|
||||
|
||||
bool f2fs_is_dirty_device(struct f2fs_sb_info *sbi, nid_t ino,
|
||||
|
|
@ -875,14 +881,14 @@ void f2fs_release_orphan_inode(struct f2fs_sb_info *sbi)
|
|||
void f2fs_add_orphan_inode(struct inode *inode)
|
||||
{
|
||||
/* add new orphan ino entry into list */
|
||||
__add_ino_entry(F2FS_I_SB(inode), inode->i_ino, 0, ORPHAN_INO);
|
||||
f2fs_add_ino_entry(F2FS_I_SB(inode), inode->i_ino, ORPHAN_INO);
|
||||
f2fs_update_inode_page(inode);
|
||||
}
|
||||
|
||||
void f2fs_remove_orphan_inode(struct f2fs_sb_info *sbi, nid_t ino)
|
||||
{
|
||||
/* remove orphan entry from orphan list */
|
||||
__remove_ino_entry(sbi, ino, ORPHAN_INO);
|
||||
f2fs_remove_ino_entry(sbi, ino, ORPHAN_INO);
|
||||
}
|
||||
|
||||
static int recover_orphan_inode(struct f2fs_sb_info *sbi, nid_t ino)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user