wait_on_buffer(bh);
goto wait_for_iobuf;
}
- cond_resched();
if (unlikely(!buffer_uptodate(bh)))
err = -EIO;
journal_file_buffer(jh, commit_transaction, BJ_Forget);
/* Wake up any transactions which were waiting for this
IO to complete */
- wake_up_buffer(bh);
+ wake_up_bit(&bh->b_state, BH_Unshadow);
JBUFFER_TRACE(jh, "brelse shadowed buffer");
__brelse(bh);
}
wait_on_buffer(bh);
goto wait_for_ctlbuf;
}
- cond_resched();
if (unlikely(!buffer_uptodate(bh)))
err = -EIO;
if (err)
__journal_abort_hard(journal);
- /*
- * Call any callbacks that had been registered for handles in this
- * transaction. It is up to the callback to free any allocated
- * memory.
- *
- * The spinlocking (t_jcb_lock) here is surely unnecessary...
- */
- spin_lock(&commit_transaction->t_jcb_lock);
- if (!list_empty(&commit_transaction->t_jcb)) {
- struct list_head *p, *n;
- int error = is_journal_aborted(journal);
-
- list_for_each_safe(p, n, &commit_transaction->t_jcb) {
- struct journal_callback *jcb;
-
- jcb = list_entry(p, struct journal_callback, jcb_list);
- list_del(p);
- spin_unlock(&commit_transaction->t_jcb_lock);
- jcb->jcb_func(jcb, error);
- spin_lock(&commit_transaction->t_jcb_lock);
- }
- }
- spin_unlock(&commit_transaction->t_jcb_lock);
-
jbd_debug(3, "JBD: commit phase 7\n");
J_ASSERT(commit_transaction->t_sync_datalist == NULL);
release_buffer_page(bh);
}
spin_unlock(&journal->j_list_lock);
- cond_resched();
}
/* Done with this transaction! */