sched: Remove proliferation of wait_on_bit() action functions
[deliverable/linux.git] / fs / jbd2 / transaction.c
index 38cfcf5f6fce6127807da86c8e5d6a9be867fb98..5f09370c90a8199647a87ef7cb6a5cfdba113d2b 100644 (file)
@@ -763,12 +763,6 @@ static void warn_dirty_buffer(struct buffer_head *bh)
               bdevname(bh->b_bdev, b), (unsigned long long)bh->b_blocknr);
 }
 
-static int sleep_on_shadow_bh(void *word)
-{
-       io_schedule();
-       return 0;
-}
-
 /*
  * If the buffer is already part of the current transaction, then there
  * is nothing we need to do.  If it is already part of a prior
@@ -906,8 +900,8 @@ repeat:
                if (buffer_shadow(bh)) {
                        JBUFFER_TRACE(jh, "on shadow: sleep");
                        jbd_unlock_bh_state(bh);
-                       wait_on_bit(&bh->b_state, BH_Shadow,
-                                   sleep_on_shadow_bh, TASK_UNINTERRUPTIBLE);
+                       wait_on_bit_io(&bh->b_state, BH_Shadow,
+                                      TASK_UNINTERRUPTIBLE);
                        goto repeat;
                }
 
@@ -1588,9 +1582,12 @@ int jbd2_journal_stop(handle_t *handle)
         * to perform a synchronous write.  We do this to detect the
         * case where a single process is doing a stream of sync
         * writes.  No point in waiting for joiners in that case.
+        *
+        * Setting max_batch_time to 0 disables this completely.
         */
        pid = current->pid;
-       if (handle->h_sync && journal->j_last_sync_writer != pid) {
+       if (handle->h_sync && journal->j_last_sync_writer != pid &&
+           journal->j_max_batch_time) {
                u64 commit_time, trans_time;
 
                journal->j_last_sync_writer = pid;
This page took 0.025298 seconds and 5 git commands to generate.