Commit b7d41b55 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ext3: journal_flush() needs journal_lock_updates()

We need to take journal_lock_updates() while remounting r/o to prevent a new
transaction starting while journal_flush() is running.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 85aeb8a6
......@@ -1875,13 +1875,17 @@ static void ext3_commit_super (struct super_block * sb,
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);
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment