Skip to content

Commit

Permalink
jfs: fix error path in ialloc
Browse files Browse the repository at this point in the history
If insert_inode_locked() fails, we shouldn't be calling
unlock_new_inode().

Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Tested-by: Michael L. Semon <mlsemon35@gmail.com>
Cc: stable@vger.kernel.org
  • Loading branch information
Dave Kleikamp committed Sep 17, 2013
1 parent 44598f9 commit 8660998
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/jfs/jfs_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 8660998

Please sign in to comment.