]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
jfs: fix error path in ialloc
authorDave Kleikamp <dave.kleikamp@oracle.com>
Sat, 7 Sep 2013 02:49:56 +0000 (21:49 -0500)
committerDave Kleikamp <dave.kleikamp@oracle.com>
Sat, 7 Sep 2013 02:49:56 +0000 (21:49 -0500)
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>
fs/jfs/jfs_inode.c

index c1a3e603279c9cbe4fb141fc2b9bdcfa1d76a033..7f464c513ba0a85a2fd4fe7923a9799bb319e92b 100644 (file)
@@ -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: