Commit 86609986 authored by Dave Kleikamp's avatar Dave Kleikamp

jfs: fix error path in ialloc

If insert_inode_locked() fails, we shouldn't be calling
unlock_new_inode().
Signed-off-by: default avatarDave Kleikamp <dave.kleikamp@oracle.com>
Tested-by: default avatarMichael L. Semon <mlsemon35@gmail.com>
Cc: stable@vger.kernel.org
parent 44598f98
......@@ -95,7 +95,7 @@ struct inode *ialloc(struct inode *parent, umode_t mode)
if (insert_inode_locked(inode) < 0) {
rc = -EINVAL;
goto fail_unlock;
goto fail_put;
}
inode_init_owner(inode, parent, mode);
......@@ -156,7 +156,6 @@ struct inode *ialloc(struct inode *parent, umode_t mode)
fail_drop:
dquot_drop(inode);
inode->i_flags |= S_NOQUOTA;
fail_unlock:
clear_nlink(inode);
unlock_new_inode(inode);
fail_put:
......
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