summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2018-06-06 23:55:01 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2018-09-18 13:35:59 -0700
commit1e77f24e1b45f615cb916c8f896a39d30601e0d0 (patch)
tree712a5e7cefdfca91ef19ad591ee0fbe053bbf2e0
parent0c12cf984c2b3301c82f5ccb70d03824914564f2 (diff)
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: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r--fs/f2fs/checkpoint.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index fd9d139bd7d3..3019b2a52c07 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -571,12 +571,7 @@ static int recover_orphan_inode(struct f2fs_sb_info *sbi, nid_t ino)
{
struct inode *inode;
struct node_info ni;
- int err = f2fs_acquire_orphan_inode(sbi);
-
- if (err)
- goto err_out;
-
- __add_ino_entry(sbi, ino, 0, ORPHAN_INO);
+ int err;
inode = f2fs_iget_retry(sbi->sb, ino);
if (IS_ERR(inode)) {
@@ -606,7 +601,6 @@ static int recover_orphan_inode(struct f2fs_sb_info *sbi, nid_t ino)
err = -EIO;
goto err_out;
}
- __remove_ino_entry(sbi, ino, ORPHAN_INO);
return 0;
err_out: