VisionFive2 Linux kernel

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

More than 9999 Commits   32 Branches   54 Tags
author: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com> 2008-10-10 20:29:31 -0400 committer: Theodore Ts'o <tytso@mit.edu> 2008-10-10 20:29:31 -0400 commit: 7ad7445f60fe4d46c4c9d2a9463db180d2a3b270 parent: 7ffe1ea8949c75ecffb7a4d988bb881a9fa62fbe
Commit Summary:
jbd2: don't dirty original metadata buffer on abort
Diffstat:
1 file changed, 4 insertions, 1 deletion
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
index 78e4da934121..849f10496cea 100644
--- a/fs/jbd2/commit.c
+++ b/fs/jbd2/commit.c
@@ -504,9 +504,10 @@ void jbd2_journal_commit_transaction(journal_t *journal)
 		jh = commit_transaction->t_buffers;
 
 		/* If we're in abort mode, we just un-journal the buffer and
-		   release it for background writing. */
+		   release it. */
 
 		if (is_journal_aborted(journal)) {
+			clear_buffer_jbddirty(jh2bh(jh));
 			JBUFFER_TRACE(jh, "journal is aborting: refile");
 			jbd2_journal_refile_buffer(journal, jh);
 			/* If that was the last one, we need to clean up
@@ -884,6 +885,8 @@ restart_loop:
 		if (buffer_jbddirty(bh)) {
 			JBUFFER_TRACE(jh, "add to new checkpointing trans");
 			__jbd2_journal_insert_checkpoint(jh, commit_transaction);
+			if (is_journal_aborted(journal))
+				clear_buffer_jbddirty(bh);
 			JBUFFER_TRACE(jh, "refile for checkpoint writeback");
 			__jbd2_journal_refile_buffer(jh);
 			jbd_unlock_bh_state(bh);