[3.5.y.z extended stable] Patch "jfs: fix error path in ialloc" has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Wed Nov 6 10:39:56 UTC 2013


This is a note to let you know that I have just added a patch titled

    jfs: fix error path in ialloc

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

>From bb80a35afe3572387065b855151e31d080f8be56 Mon Sep 17 00:00:00 2001
From: Dave Kleikamp <dave.kleikamp at oracle.com>
Date: Fri, 6 Sep 2013 21:49:56 -0500
Subject: 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 at oracle.com>
Tested-by: Michael L. Semon <mlsemon35 at gmail.com>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
 fs/jfs/jfs_inode.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/jfs/jfs_inode.c b/fs/jfs/jfs_inode.c
index c1a3e60..7f464c5 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:
--
1.8.3.2





More information about the kernel-team mailing list