VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   55 Tags
author: Jan Kara <jack@suse.cz> 2012-03-13 15:43:04 -0400 committer: Theodore Ts'o <tytso@mit.edu> 2012-03-13 15:43:04 -0400 commit: a78bb11d7acd525623c6a0c2ff4e213d527573fa parent: 24bcc89c7e7c64982e6192b4952a0a92379fc341
Commit Summary:
jbd2: protect all log tail updates with j_checkpoint_mutex
Diffstat:
1 file changed, 2 insertions, 0 deletions
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
index 19371a8a9015..6705717d9b7f 100644
--- a/fs/jbd2/commit.c
+++ b/fs/jbd2/commit.c
@@ -340,7 +340,9 @@ void jbd2_journal_commit_transaction(journal_t *journal)
 	/* Do we need to erase the effects of a prior jbd2_journal_flush? */
 	if (journal->j_flags & JBD2_FLUSHED) {
 		jbd_debug(3, "super block updated\n");
+		mutex_lock(&journal->j_checkpoint_mutex);
 		jbd2_journal_update_sb_log_tail(journal);
+		mutex_unlock(&journal->j_checkpoint_mutex);
 	} else {
 		jbd_debug(3, "superblock not updated\n");
 	}