diff options
Diffstat (limited to 'fs/jbd2/transaction.c')
-rw-r--r-- | fs/jbd2/transaction.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c index f3479d6e0a83..faad2bd787c7 100644 --- a/fs/jbd2/transaction.c +++ b/fs/jbd2/transaction.c | |||
@@ -156,6 +156,7 @@ alloc_transaction: | |||
156 | */ | 156 | */ |
157 | repeat: | 157 | repeat: |
158 | read_lock(&journal->j_state_lock); | 158 | read_lock(&journal->j_state_lock); |
159 | BUG_ON(journal->j_flags & JBD2_UNMOUNT); | ||
159 | if (is_journal_aborted(journal) || | 160 | if (is_journal_aborted(journal) || |
160 | (journal->j_errno != 0 && !(journal->j_flags & JBD2_ACK_ERR))) { | 161 | (journal->j_errno != 0 && !(journal->j_flags & JBD2_ACK_ERR))) { |
161 | read_unlock(&journal->j_state_lock); | 162 | read_unlock(&journal->j_state_lock); |
@@ -250,7 +251,7 @@ repeat: | |||
250 | * the committing transaction. Really, we only need to give it | 251 | * the committing transaction. Really, we only need to give it |
251 | * committing_transaction->t_outstanding_credits plus "enough" for | 252 | * committing_transaction->t_outstanding_credits plus "enough" for |
252 | * the log control blocks. | 253 | * the log control blocks. |
253 | * Also, this test is inconsitent with the matching one in | 254 | * Also, this test is inconsistent with the matching one in |
254 | * jbd2_journal_extend(). | 255 | * jbd2_journal_extend(). |
255 | */ | 256 | */ |
256 | if (__jbd2_log_space_left(journal) < jbd_space_needed(journal)) { | 257 | if (__jbd2_log_space_left(journal) < jbd_space_needed(journal)) { |
@@ -339,9 +340,7 @@ handle_t *jbd2__journal_start(journal_t *journal, int nblocks, int gfp_mask) | |||
339 | jbd2_free_handle(handle); | 340 | jbd2_free_handle(handle); |
340 | current->journal_info = NULL; | 341 | current->journal_info = NULL; |
341 | handle = ERR_PTR(err); | 342 | handle = ERR_PTR(err); |
342 | goto out; | ||
343 | } | 343 | } |
344 | out: | ||
345 | return handle; | 344 | return handle; |
346 | } | 345 | } |
347 | EXPORT_SYMBOL(jbd2__journal_start); | 346 | EXPORT_SYMBOL(jbd2__journal_start); |
@@ -588,7 +587,7 @@ do_get_write_access(handle_t *handle, struct journal_head *jh, | |||
588 | transaction = handle->h_transaction; | 587 | transaction = handle->h_transaction; |
589 | journal = transaction->t_journal; | 588 | journal = transaction->t_journal; |
590 | 589 | ||
591 | jbd_debug(5, "buffer_head %p, force_copy %d\n", jh, force_copy); | 590 | jbd_debug(5, "journal_head %p, force_copy %d\n", jh, force_copy); |
592 | 591 | ||
593 | JBUFFER_TRACE(jh, "entry"); | 592 | JBUFFER_TRACE(jh, "entry"); |
594 | repeat: | 593 | repeat: |
@@ -773,7 +772,7 @@ done: | |||
773 | J_EXPECT_JH(jh, buffer_uptodate(jh2bh(jh)), | 772 | J_EXPECT_JH(jh, buffer_uptodate(jh2bh(jh)), |
774 | "Possible IO failure.\n"); | 773 | "Possible IO failure.\n"); |
775 | page = jh2bh(jh)->b_page; | 774 | page = jh2bh(jh)->b_page; |
776 | offset = ((unsigned long) jh2bh(jh)->b_data) & ~PAGE_MASK; | 775 | offset = offset_in_page(jh2bh(jh)->b_data); |
777 | source = kmap_atomic(page, KM_USER0); | 776 | source = kmap_atomic(page, KM_USER0); |
778 | /* Fire data frozen trigger just before we copy the data */ | 777 | /* Fire data frozen trigger just before we copy the data */ |
779 | jbd2_buffer_frozen_trigger(jh, source + offset, | 778 | jbd2_buffer_frozen_trigger(jh, source + offset, |