OSDN Git Service

f2fs: don't acquire orphan ino during recovery
authorChao Yu <yuchao0@huawei.com>
Wed, 6 Jun 2018 15:55:01 +0000 (23:55 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 27 Jul 2018 09:03:59 +0000 (18:03 +0900)
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>
fs/f2fs/checkpoint.c

index 1a3ec97..502d7af 100644 (file)
@@ -570,12 +570,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)) {
@@ -605,7 +600,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: