[PATCH - 2.6.17-rc5] ext3: Fix missed mutex unlock - unroll

Jan Capek jca at sysgo.com
Fri May 26 10:08:31 UTC 2006


I believe the following patch in the GIT - 2.6.17-rc5 is not correct:


It is the second of the two patches contributed by Leonid Ananiev. This 
one incorrectly adds the super block unlocking in the error path, though. 
As we can see in the function ext3_group_add() the unlock is already 
handled at the label 'exit_journal' for all error paths.
Below is the patch that should be unrolled.



Jan Capek
SYSGO | Real-Time Solutions | ELinOS Embedded Linux | http://www.sysgo.com

From: Ananiev, Leonid I <leonid.i.ananiev at intel.com>
Date: Tue, 11 Apr 2006 05:54:38 +0000 (-0700)
Subject: [PATCH] ext3: Fix missed mutex unlock
X-Git-Tag: v2.6.17-rc2
X-Git-Url: http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=75616cf9854b83eb83a968b1338ae0ee11c9673c

[PATCH] ext3: Fix missed mutex unlock

Missed unlock_super()call is added in error condition code path.

Signed-off-by: Leonid Ananiev <leonid.i.ananiev at intel.com>
Signed-off-by: Andrew Morton <akpm at osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>

--- a/fs/ext3/resize.c
+++ b/fs/ext3/resize.c
@@ -767,6 +767,7 @@ int ext3_group_add(struct super_block *s
  	if (input->group != sbi->s_groups_count) {
  		ext3_warning(sb, __FUNCTION__,
  			     "multiple resizers run on filesystem!");
+		unlock_super(sb);
  		err = -EBUSY;
  		goto exit_journal;

More information about the Ext3-users mailing list