提交 d726732c 编写于 作者: C Chao Yu 提交者: Jaegeuk Kim

f2fs: fix to avoid unneeded unlock_new_inode

During ->lookup, I_NEW state of inode was been cleared in f2fs_iget,
so in error path, we don't need to clear it again.
Signed-off-by: NChao Yu <chao@kernel.org>
Signed-off-by: NJaegeuk Kim <jaegeuk@kernel.org>
上级 291bf80b
......@@ -308,13 +308,13 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry,
!fscrypt_has_permitted_context(dir, inode)) {
bool nokey = f2fs_encrypted_inode(inode) &&
!fscrypt_has_encryption_key(inode);
iput(inode);
return nokey ? ERR_PTR(-ENOKEY) : ERR_PTR(-EPERM);
err = nokey ? -ENOKEY : -EPERM;
goto err_out;
}
return d_splice_alias(inode, dentry);
err_out:
iget_failed(inode);
iput(inode);
return ERR_PTR(err);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册