]> err.no Git - linux-2.6/blobdiff - fs/jbd/checkpoint.c
[PATCH] updated hdaps driver.
[linux-2.6] / fs / jbd / checkpoint.c
index 98d830401c56c7e50463e85acfe994f76171bb99..014a51fd00d776d0ded21d1e3eaf6b7cf22ca1ec 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