diff options
| author | Chao Yu <chao@kernel.org> | 2016-03-10 22:24:23 +0800 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-13 12:33:13 +0200 |
| commit | 4e2c43dd3827af0ed4590e19ae209bd55a0d9102 (patch) | |
| tree | 13c883797addcd585ee088d7823c3023cd0eb3aa | |
| parent | 0d85f2e9b77b5fe1c26e6b29f22810723f7710ed (diff) | |
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: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| -rw-r--r-- | fs/f2fs/namei.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index bc3739769..a0bb668bc 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c @@ -309,13 +309,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); } |
