Staging: comedi: Corrected type of a printk argument in resize_async_buffer().
[pandora-kernel.git] / block / cfq-iosched.c
index 3010e2e..9c4b679 100644 (file)
@@ -1345,15 +1345,9 @@ static int cfq_dispatch_requests(struct request_queue *q, int force)
                unsigned long last_sync = jiffies - cfqd->last_end_sync_rq;
                unsigned int depth;
 
-               /*
-                * must wait a bit longer
-                */
-               if (last_sync < cfq_slice_sync) {
-                       cfq_schedule_dispatch(cfqd, cfq_slice_sync - last_sync);
-                       return 0;
-               }
-
-               depth = last_sync / cfq_slice_sync;
+               depth = last_sync / cfqd->cfq_slice[1];
+               if (!depth && !cfqq->dispatched)
+                       depth = 1;
                if (depth < max_dispatch)
                        max_dispatch = depth;
        }