]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/jbd2/commit.c
ipg: fix Tx completion irq request
[linux-2.6-omap-h63xx.git] / fs / jbd2 / commit.c
index 6bd8005e3d34434d95fac5037d79d4042af34678..6986f334c643291181cd56c01c42a8820ad110f0 100644 (file)
@@ -20,7 +20,6 @@
 #include <linux/slab.h>
 #include <linux/mm.h>
 #include <linux/pagemap.h>
-#include <linux/smp_lock.h>
 
 /*
  * Default IO end handler for temporary BJ_IO buffer_heads.
@@ -279,7 +278,7 @@ static inline void write_tag_block(int tag_bytes, journal_block_tag_t *tag,
                                   unsigned long long block)
 {
        tag->t_blocknr = cpu_to_be32(block & (u32)~0);
-       if (tag_bytes > JBD_TAG_SIZE32)
+       if (tag_bytes > JBD2_TAG_SIZE32)
                tag->t_blocknr_high = cpu_to_be32((block >> 31) >> 1);
 }
 
@@ -385,7 +384,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
                        struct buffer_head *bh = jh2bh(jh);
 
                        jbd_lock_bh_state(bh);
-                       jbd2_slab_free(jh->b_committed_data, bh->b_size);
+                       jbd2_free(jh->b_committed_data, bh->b_size);
                        jh->b_committed_data = NULL;
                        jbd_unlock_bh_state(bh);
                }
@@ -476,7 +475,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
        spin_unlock(&journal->j_list_lock);
 
        if (err)
-               __jbd2_journal_abort_hard(journal);
+               jbd2_journal_abort(journal, err);
 
        jbd2_journal_write_revoke_records(journal, commit_transaction);
 
@@ -534,7 +533,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
 
                        descriptor = jbd2_journal_get_descriptor_buffer(journal);
                        if (!descriptor) {
-                               __jbd2_journal_abort_hard(journal);
+                               jbd2_journal_abort(journal, -EIO);
                                continue;
                        }
 
@@ -567,7 +566,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
                   and repeat this loop: we'll fall into the
                   refile-on-abort condition above. */
                if (err) {
-                       __jbd2_journal_abort_hard(journal);
+                       jbd2_journal_abort(journal, err);
                        continue;
                }
 
@@ -758,7 +757,7 @@ wait_for_iobuf:
                err = -EIO;
 
        if (err)
-               __jbd2_journal_abort_hard(journal);
+               jbd2_journal_abort(journal, err);
 
        /* End of a transaction!  Finally, we can do checkpoint
            processing: any buffers committed as a result of this
@@ -802,14 +801,14 @@ restart_loop:
                 * Otherwise, we can just throw away the frozen data now.
                 */
                if (jh->b_committed_data) {
-                       jbd2_slab_free(jh->b_committed_data, bh->b_size);
+                       jbd2_free(jh->b_committed_data, bh->b_size);
                        jh->b_committed_data = NULL;
                        if (jh->b_frozen_data) {
                                jh->b_committed_data = jh->b_frozen_data;
                                jh->b_frozen_data = NULL;
                        }
                } else if (jh->b_frozen_data) {
-                       jbd2_slab_free(jh->b_frozen_data, bh->b_size);
+                       jbd2_free(jh->b_frozen_data, bh->b_size);
                        jh->b_frozen_data = NULL;
                }
 
@@ -897,7 +896,8 @@ restart_loop:
        journal->j_committing_transaction = NULL;
        spin_unlock(&journal->j_state_lock);
 
-       if (commit_transaction->t_checkpoint_list == NULL) {
+       if (commit_transaction->t_checkpoint_list == NULL &&
+           commit_transaction->t_checkpoint_io_list == NULL) {
                __jbd2_journal_drop_transaction(journal, commit_transaction);
        } else {
                if (journal->j_checkpoint_transactions == NULL) {