mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
jfs: fix error path in ialloc
commit 8660998608
upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9fda0bdd95
commit
20b2a1eb2d
1 changed files with 1 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue