aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jbd2/commit.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jbd2/commit.c')
-rw-r--r--fs/jbd2/commit.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
index 0d3814a35ed1..0abe02c4242a 100644
--- a/fs/jbd2/commit.c
+++ b/fs/jbd2/commit.c
@@ -504,9 +504,10 @@ void jbd2_journal_commit_transaction(journal_t *journal)
504 jh = commit_transaction->t_buffers; 504 jh = commit_transaction->t_buffers;
505 505
506 /* If we're in abort mode, we just un-journal the buffer and 506 /* If we're in abort mode, we just un-journal the buffer and
507 release it for background writing. */ 507 release it. */
508 508
509 if (is_journal_aborted(journal)) { 509 if (is_journal_aborted(journal)) {
510 clear_buffer_jbddirty(jh2bh(jh));
510 JBUFFER_TRACE(jh, "journal is aborting: refile"); 511 JBUFFER_TRACE(jh, "journal is aborting: refile");
511 jbd2_journal_refile_buffer(journal, jh); 512 jbd2_journal_refile_buffer(journal, jh);
512 /* If that was the last one, we need to clean up 513 /* If that was the last one, we need to clean up
@@ -683,6 +684,8 @@ start_journal_io:
683 printk(KERN_WARNING 684 printk(KERN_WARNING
684 "JBD2: Detected IO errors while flushing file data " 685 "JBD2: Detected IO errors while flushing file data "
685 "on %s\n", journal->j_devname); 686 "on %s\n", journal->j_devname);
687 if (journal->j_flags & JBD2_ABORT_ON_SYNCDATA_ERR)
688 jbd2_journal_abort(journal, err);
686 err = 0; 689 err = 0;
687 } 690 }
688 691
@@ -783,6 +786,9 @@ wait_for_iobuf:
783 /* AKPM: bforget here */ 786 /* AKPM: bforget here */
784 } 787 }
785 788
789 if (err)
790 jbd2_journal_abort(journal, err);
791
786 jbd_debug(3, "JBD: commit phase 5\n"); 792 jbd_debug(3, "JBD: commit phase 5\n");
787 793
788 if (!JBD2_HAS_INCOMPAT_FEATURE(journal, 794 if (!JBD2_HAS_INCOMPAT_FEATURE(journal,
@@ -881,6 +887,8 @@ restart_loop:
881 if (buffer_jbddirty(bh)) { 887 if (buffer_jbddirty(bh)) {
882 JBUFFER_TRACE(jh, "add to new checkpointing trans"); 888 JBUFFER_TRACE(jh, "add to new checkpointing trans");
883 __jbd2_journal_insert_checkpoint(jh, commit_transaction); 889 __jbd2_journal_insert_checkpoint(jh, commit_transaction);
890 if (is_journal_aborted(journal))
891 clear_buffer_jbddirty(bh);
884 JBUFFER_TRACE(jh, "refile for checkpoint writeback"); 892 JBUFFER_TRACE(jh, "refile for checkpoint writeback");
885 __jbd2_journal_refile_buffer(jh); 893 __jbd2_journal_refile_buffer(jh);
886 jbd_unlock_bh_state(bh); 894 jbd_unlock_bh_state(bh);