Merge to Fedora kernel-2.6.7-1.492
[linux-2.6.git] / fs / jbd / commit.c
index c1eb3c5..9645163 100644 (file)
@@ -362,7 +362,7 @@ write_out_data:
         */
        commit_transaction->t_state = T_COMMIT;
 
-       descriptor = 0;
+       descriptor = NULL;
        bufs = 0;
        while (commit_transaction->t_buffers) {
 
@@ -503,7 +503,7 @@ write_out_data:
 start_journal_io:
                        for (i = 0; i < bufs; i++) {
                                struct buffer_head *bh = wbuf[i];
-                               set_buffer_locked(bh);
+                               lock_buffer(bh);
                                clear_buffer_dirty(bh);
                                set_buffer_uptodate(bh);
                                bh->b_end_io = journal_end_buffer_io_sync;
@@ -545,6 +545,7 @@ wait_for_iobuf:
                        wait_on_buffer(bh);
                        goto wait_for_iobuf;
                }
+               cond_resched();
 
                if (unlikely(!buffer_uptodate(bh)))
                        err = -EIO;
@@ -599,6 +600,7 @@ wait_for_iobuf:
                        wait_on_buffer(bh);
                        goto wait_for_ctlbuf;
                }
+               cond_resched();
 
                if (unlikely(!buffer_uptodate(bh)))
                        err = -EIO;
@@ -764,6 +766,7 @@ skip_commit: /* The journal should be unlocked by now. */
                        release_buffer_page(bh);
                }
                spin_unlock(&journal->j_list_lock);
+               cond_resched();
        }
 
        /* Done with this transaction! */