]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/jbd/commit.c
jbd: don't dirty original metadata buffer on abort
[linux-2.6-omap-h63xx.git] / fs / jbd / commit.c
index f1ea861b9929c5578134f7a9dd5dcf0b72917b60..d6a6659f3e46e258b253ce7cdc6b6665e91b0f92 100644 (file)
@@ -518,9 +518,10 @@ void 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");
                        journal_refile_buffer(journal, jh);
                        /* If that was the last one, we need to clean up
@@ -855,6 +856,8 @@ restart_loop:
                if (buffer_jbddirty(bh)) {
                        JBUFFER_TRACE(jh, "add to new checkpointing trans");
                        __journal_insert_checkpoint(jh, commit_transaction);
+                       if (is_journal_aborted(journal))
+                               clear_buffer_jbddirty(bh);
                        JBUFFER_TRACE(jh, "refile for checkpoint writeback");
                        __journal_refile_buffer(jh);
                        jbd_unlock_bh_state(bh);