lkml.org 
[lkml]   [2004]   [Jun]   [4]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateThu, 3 Jun 2004 21:30:39 -0700
FromAndrew Morton <>
SubjectRe: Bug#252391: kernel-source-2.6.6: Assertion failure in journal_flush() ... "!journal->j_running_transaction"
Herbert Xu <herbert@gondor.apana.org.au> wrote:
>
> Andrew, what's stopping a journal_start() from setting j_running_transaction
>  just before the last spin_lock(&journal->j_state_lock) that guards the
>  J_ASSERT that was hit below?

Not much, it appears.  I'll queue the below for post-2.6.7.


--- 25/fs/ext3/super.c~ext3-journal_flush-needs-journal_lock_updates	2004-06-03 21:15:57.911628872 -0700
+++ 25-akpm/fs/ext3/super.c	2004-06-03 21:15:57.916628112 -0700
@@ -1907,13 +1907,17 @@ static void ext3_commit_super (struct su
 static void ext3_mark_recovery_complete(struct super_block * sb,
 					struct ext3_super_block * es)
 {
-	journal_flush(EXT3_SB(sb)->s_journal);
+	journal_t *journal = EXT3_SB(sb)->s_journal;
+
+	journal_lock_updates(journal);
+	journal_flush(journal);
 	if (EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_RECOVER) &&
 	    sb->s_flags & MS_RDONLY) {
 		EXT3_CLEAR_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_RECOVER);
 		sb->s_dirt = 0;
 		ext3_commit_super(sb, es, 1);
 	}
+	journal_unlock_updates(journal);
 }
 
 /*
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [from the cache]
©2003-2008