summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorDave Kleikamp <dave.kleikamp@oracle.com>2013-09-06 21:49:56 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-11-13 12:01:48 +0900
commit20b2a1eb2de54d0fce4dee198546cc448589dad8 (patch)
tree46fa8e5282020453e9cefe42f8bef7d5c1db2552 /fs
parent9fda0bdd950b09c42e26cc7e19590ce62e842fee (diff)
downloadlwn-20b2a1eb2de54d0fce4dee198546cc448589dad8.tar.gz
lwn-20b2a1eb2de54d0fce4dee198546cc448589dad8.zip
jfs: fix error path in ialloc
commit 8660998608cfa1077e560034db81885af8e1e885 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>
Diffstat (limited to 'fs')
-rw-r--r--fs/jfs/jfs_inode.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/jfs/jfs_inode.c b/fs/jfs/jfs_inode.c
index c1a3e603279c..7f464c513ba0 100644
--- a/fs/jfs/jfs_inode.c
+++ b/fs/jfs/jfs_inode.c
@@ -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: