Commit 76a45e3c authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim

f2fs: don't acquire orphan ino during recovery

During orphan inode recovery, checkpoint should never succeed due to
SBI_POR_DOING flag, so we don't need acquire orphan ino which only be
used by checkpoint.
Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent a1933c09
...@@ -570,12 +570,7 @@ static int recover_orphan_inode(struct f2fs_sb_info *sbi, nid_t ino) ...@@ -570,12 +570,7 @@ static int recover_orphan_inode(struct f2fs_sb_info *sbi, nid_t ino)
{ {
struct inode *inode; struct inode *inode;
struct node_info ni; struct node_info ni;
int err = f2fs_acquire_orphan_inode(sbi); int err;
if (err)
goto err_out;
__add_ino_entry(sbi, ino, 0, ORPHAN_INO);
inode = f2fs_iget_retry(sbi->sb, ino); inode = f2fs_iget_retry(sbi->sb, ino);
if (IS_ERR(inode)) { if (IS_ERR(inode)) {
...@@ -605,7 +600,6 @@ static int recover_orphan_inode(struct f2fs_sb_info *sbi, nid_t ino) ...@@ -605,7 +600,6 @@ static int recover_orphan_inode(struct f2fs_sb_info *sbi, nid_t ino)
err = -EIO; err = -EIO;
goto err_out; goto err_out;
} }
__remove_ino_entry(sbi, ino, ORPHAN_INO);
return 0; return 0;
err_out: err_out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment