aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jbd/transaction.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jbd/transaction.c')
-rw-r--r--fs/jbd/transaction.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c
index 8df5bac0b7a..9841b1e5af0 100644
--- a/fs/jbd/transaction.c
+++ b/fs/jbd/transaction.c
@@ -96,8 +96,8 @@ static int start_this_handle(journal_t *journal, handle_t *handle)
96 96
97alloc_transaction: 97alloc_transaction:
98 if (!journal->j_running_transaction) { 98 if (!journal->j_running_transaction) {
99 new_transaction = jbd_kmalloc(sizeof(*new_transaction), 99 new_transaction = kmalloc(sizeof(*new_transaction),
100 GFP_NOFS); 100 GFP_NOFS|__GFP_NOFAIL);
101 if (!new_transaction) { 101 if (!new_transaction) {
102 ret = -ENOMEM; 102 ret = -ENOMEM;
103 goto out; 103 goto out;
@@ -675,7 +675,7 @@ repeat:
675 JBUFFER_TRACE(jh, "allocate memory for buffer"); 675 JBUFFER_TRACE(jh, "allocate memory for buffer");
676 jbd_unlock_bh_state(bh); 676 jbd_unlock_bh_state(bh);
677 frozen_buffer = 677 frozen_buffer =
678 jbd_slab_alloc(jh2bh(jh)->b_size, 678 jbd_alloc(jh2bh(jh)->b_size,
679 GFP_NOFS); 679 GFP_NOFS);
680 if (!frozen_buffer) { 680 if (!frozen_buffer) {
681 printk(KERN_EMERG 681 printk(KERN_EMERG
@@ -735,7 +735,7 @@ done:
735 735
736out: 736out:
737 if (unlikely(frozen_buffer)) /* It's usually NULL */ 737 if (unlikely(frozen_buffer)) /* It's usually NULL */
738 jbd_slab_free(frozen_buffer, bh->b_size); 738 jbd_free(frozen_buffer, bh->b_size);
739 739
740 JBUFFER_TRACE(jh, "exit"); 740 JBUFFER_TRACE(jh, "exit");
741 return error; 741 return error;
@@ -888,7 +888,7 @@ int journal_get_undo_access(handle_t *handle, struct buffer_head *bh)
888 888
889repeat: 889repeat:
890 if (!jh->b_committed_data) { 890 if (!jh->b_committed_data) {
891 committed_data = jbd_slab_alloc(jh2bh(jh)->b_size, GFP_NOFS); 891 committed_data = jbd_alloc(jh2bh(jh)->b_size, GFP_NOFS);
892 if (!committed_data) { 892 if (!committed_data) {
893 printk(KERN_EMERG "%s: No memory for committed data\n", 893 printk(KERN_EMERG "%s: No memory for committed data\n",
894 __FUNCTION__); 894 __FUNCTION__);
@@ -915,7 +915,7 @@ repeat:
915out: 915out:
916 journal_put_journal_head(jh); 916 journal_put_journal_head(jh);
917 if (unlikely(committed_data)) 917 if (unlikely(committed_data))
918 jbd_slab_free(committed_data, bh->b_size); 918 jbd_free(committed_data, bh->b_size);
919 return err; 919 return err;
920} 920}
921 921
@@ -1172,7 +1172,7 @@ int journal_dirty_metadata(handle_t *handle, struct buffer_head *bh)
1172 } 1172 }
1173 1173
1174 /* That test should have eliminated the following case: */ 1174 /* That test should have eliminated the following case: */
1175 J_ASSERT_JH(jh, jh->b_frozen_data == 0); 1175 J_ASSERT_JH(jh, jh->b_frozen_data == NULL);
1176 1176
1177 JBUFFER_TRACE(jh, "file as BJ_Metadata"); 1177 JBUFFER_TRACE(jh, "file as BJ_Metadata");
1178 spin_lock(&journal->j_list_lock); 1178 spin_lock(&journal->j_list_lock);
@@ -1522,7 +1522,7 @@ static void __journal_temp_unlink_buffer(struct journal_head *jh)
1522 1522
1523 J_ASSERT_JH(jh, jh->b_jlist < BJ_Types); 1523 J_ASSERT_JH(jh, jh->b_jlist < BJ_Types);
1524 if (jh->b_jlist != BJ_None) 1524 if (jh->b_jlist != BJ_None)
1525 J_ASSERT_JH(jh, transaction != 0); 1525 J_ASSERT_JH(jh, transaction != NULL);
1526 1526
1527 switch (jh->b_jlist) { 1527 switch (jh->b_jlist) {
1528 case BJ_None: 1528 case BJ_None:
@@ -1591,11 +1591,11 @@ __journal_try_to_free_buffer(journal_t *journal, struct buffer_head *bh)
1591 if (buffer_locked(bh) || buffer_dirty(bh)) 1591 if (buffer_locked(bh) || buffer_dirty(bh))
1592 goto out; 1592 goto out;
1593 1593
1594 if (jh->b_next_transaction != 0) 1594 if (jh->b_next_transaction != NULL)
1595 goto out; 1595 goto out;
1596 1596
1597 spin_lock(&journal->j_list_lock); 1597 spin_lock(&journal->j_list_lock);
1598 if (jh->b_transaction != 0 && jh->b_cp_transaction == 0) { 1598 if (jh->b_transaction != NULL && jh->b_cp_transaction == NULL) {
1599 if (jh->b_jlist == BJ_SyncData || jh->b_jlist == BJ_Locked) { 1599 if (jh->b_jlist == BJ_SyncData || jh->b_jlist == BJ_Locked) {
1600 /* A written-back ordered data buffer */ 1600 /* A written-back ordered data buffer */
1601 JBUFFER_TRACE(jh, "release data"); 1601 JBUFFER_TRACE(jh, "release data");
@@ -1603,7 +1603,7 @@ __journal_try_to_free_buffer(journal_t *journal, struct buffer_head *bh)
1603 journal_remove_journal_head(bh); 1603 journal_remove_journal_head(bh);
1604 __brelse(bh); 1604 __brelse(bh);
1605 } 1605 }
1606 } else if (jh->b_cp_transaction != 0 && jh->b_transaction == 0) { 1606 } else if (jh->b_cp_transaction != NULL && jh->b_transaction == NULL) {
1607 /* written-back checkpointed metadata buffer */ 1607 /* written-back checkpointed metadata buffer */
1608 if (jh->b_jlist == BJ_None) { 1608 if (jh->b_jlist == BJ_None) {
1609 JBUFFER_TRACE(jh, "remove from checkpoint list"); 1609 JBUFFER_TRACE(jh, "remove from checkpoint list");
@@ -1963,7 +1963,7 @@ void __journal_file_buffer(struct journal_head *jh,
1963 1963
1964 J_ASSERT_JH(jh, jh->b_jlist < BJ_Types); 1964 J_ASSERT_JH(jh, jh->b_jlist < BJ_Types);
1965 J_ASSERT_JH(jh, jh->b_transaction == transaction || 1965 J_ASSERT_JH(jh, jh->b_transaction == transaction ||
1966 jh->b_transaction == 0); 1966 jh->b_transaction == NULL);
1967 1967
1968 if (jh->b_transaction && jh->b_jlist == jlist) 1968 if (jh->b_transaction && jh->b_jlist == jlist)
1969 return; 1969 return;