diff options
author | Dave Kleikamp <dave.kleikamp@oracle.com> | 2013-09-06 22:49:56 -0400 |
---|---|---|
committer | Dave Kleikamp <dave.kleikamp@oracle.com> | 2013-09-17 11:05:19 -0400 |
commit | 8660998608cfa1077e560034db81885af8e1e885 (patch) | |
tree | e4b7e7dc0fa1806a9241f1bb7eb9f386391d0960 /fs | |
parent | 44598f98b98e54beca34dc836b38eaea40be1abf (diff) |
jfs: fix error path in ialloc
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
Diffstat (limited to 'fs')
-rw-r--r-- | fs/jfs/jfs_inode.c | 3 |
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) | |||
95 | 95 | ||
96 | if (insert_inode_locked(inode) < 0) { | 96 | if (insert_inode_locked(inode) < 0) { |
97 | rc = -EINVAL; | 97 | rc = -EINVAL; |
98 | goto fail_unlock; | 98 | goto fail_put; |
99 | } | 99 | } |
100 | 100 | ||
101 | inode_init_owner(inode, parent, mode); | 101 | inode_init_owner(inode, parent, mode); |
@@ -156,7 +156,6 @@ struct inode *ialloc(struct inode *parent, umode_t mode) | |||
156 | fail_drop: | 156 | fail_drop: |
157 | dquot_drop(inode); | 157 | dquot_drop(inode); |
158 | inode->i_flags |= S_NOQUOTA; | 158 | inode->i_flags |= S_NOQUOTA; |
159 | fail_unlock: | ||
160 | clear_nlink(inode); | 159 | clear_nlink(inode); |
161 | unlock_new_inode(inode); | 160 | unlock_new_inode(inode); |
162 | fail_put: | 161 | fail_put: |