NTFS: Remove two bogus BUG_ON()s from fs/ntfs/mft.c.
[powerpc.git] / fs / jbd / checkpoint.c
index 98d8304..014a51f 100644 (file)
@@ -188,7 +188,6 @@ static int __cleanup_transaction(journal_t *journal, transaction_t *transaction)
                } else {
                        jbd_unlock_bh_state(bh);
                }
-               jh = next_jh;
        } while (jh != last_jh);
 
        return ret;
@@ -205,7 +204,7 @@ __flush_batch(journal_t *journal, struct buffer_head **bhs, int *batch_count)
        int i;
 
        spin_unlock(&journal->j_list_lock);
-       ll_rw_block(WRITE, *batch_count, bhs);
+       ll_rw_block(SWRITE, *batch_count, bhs);
        spin_lock(&journal->j_list_lock);
        for (i = 0; i < *batch_count; i++) {
                struct buffer_head *bh = bhs[i];
@@ -339,8 +338,10 @@ int log_do_checkpoint(journal_t *journal)
                        }
                } while (jh != last_jh && !retry);
 
-               if (batch_count)
+               if (batch_count) {
                        __flush_batch(journal, bhs, &batch_count);
+                       retry = 1;
+               }
 
                /*
                 * If someone cleaned up this transaction while we slept, we're