aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/deadline-iosched.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/block/deadline-iosched.c b/drivers/block/deadline-iosched.c
index ff5201e02153..24594c57c323 100644
--- a/drivers/block/deadline-iosched.c
+++ b/drivers/block/deadline-iosched.c
@@ -507,18 +507,12 @@ static int deadline_dispatch_requests(struct deadline_data *dd)
507 const int reads = !list_empty(&dd->fifo_list[READ]); 507 const int reads = !list_empty(&dd->fifo_list[READ]);
508 const int writes = !list_empty(&dd->fifo_list[WRITE]); 508 const int writes = !list_empty(&dd->fifo_list[WRITE]);
509 struct deadline_rq *drq; 509 struct deadline_rq *drq;
510 int data_dir, other_dir; 510 int data_dir;
511 511
512 /* 512 /*
513 * batches are currently reads XOR writes 513 * batches are currently reads XOR writes
514 */ 514 */
515 drq = NULL; 515 drq = dd->next_drq[WRITE] ? : dd->next_drq[READ];
516
517 if (dd->next_drq[READ])
518 drq = dd->next_drq[READ];
519
520 if (dd->next_drq[WRITE])
521 drq = dd->next_drq[WRITE];
522 516
523 if (drq) { 517 if (drq) {
524 /* we have a "next request" */ 518 /* we have a "next request" */
@@ -544,7 +538,6 @@ static int deadline_dispatch_requests(struct deadline_data *dd)
544 goto dispatch_writes; 538 goto dispatch_writes;
545 539
546 data_dir = READ; 540 data_dir = READ;
547 other_dir = WRITE;
548 541
549 goto dispatch_find_request; 542 goto dispatch_find_request;
550 } 543 }
@@ -560,7 +553,6 @@ dispatch_writes:
560 dd->starved = 0; 553 dd->starved = 0;
561 554
562 data_dir = WRITE; 555 data_dir = WRITE;
563 other_dir = READ;
564 556
565 goto dispatch_find_request; 557 goto dispatch_find_request;
566 } 558 }