f2fs: fix iget/iput of dir during recovery
It is possible that iput is skipped after iget during the recovery. In recover_dentry(), dir = f2fs_iget(); ... if (de && inode->i_ino == le32_to_cpu(de->ino)) goto out; In this case, this dir is not able to be added in dirty_dir_inode_list. The actual linking is done only when set_page_dirty() is called. So let's add this newly got inode into the list explicitly, and put it at the end of the recovery routine. Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
This commit is contained in:
@@ -58,6 +58,7 @@ static int recover_dentry(struct page *ipage, struct inode *inode)
|
||||
goto out;
|
||||
}
|
||||
set_inode_flag(F2FS_I(dir), FI_DELAY_IPUT);
|
||||
add_dirty_dir_inode(dir);
|
||||
}
|
||||
|
||||
name.len = le32_to_cpu(raw_inode->i_namelen);
|
||||
|
Reference in New Issue
Block a user