X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=drivers%2Fblock%2Fdeadline-iosched.c;h=52a3ae5289a09a7af79081df5de2ec7e4c40ff26;hb=e8c2cd99a3933d93413910bc93cbd5b53177110b;hp=ff5201e021534693987f30597817ef7cdb2de317;hpb=2d986010ad13a00b83851238d52601d6092df40e;p=linux-2.6-omap-h63xx.git diff --git a/drivers/block/deadline-iosched.c b/drivers/block/deadline-iosched.c index ff5201e0215..52a3ae5289a 100644 --- a/drivers/block/deadline-iosched.c +++ b/drivers/block/deadline-iosched.c @@ -507,18 +507,15 @@ static int deadline_dispatch_requests(struct deadline_data *dd) const int reads = !list_empty(&dd->fifo_list[READ]); const int writes = !list_empty(&dd->fifo_list[WRITE]); struct deadline_rq *drq; - int data_dir, other_dir; + int data_dir; /* * batches are currently reads XOR writes */ - drq = NULL; - - if (dd->next_drq[READ]) - drq = dd->next_drq[READ]; - if (dd->next_drq[WRITE]) drq = dd->next_drq[WRITE]; + else + drq = dd->next_drq[READ]; if (drq) { /* we have a "next request" */ @@ -544,7 +541,6 @@ static int deadline_dispatch_requests(struct deadline_data *dd) goto dispatch_writes; data_dir = READ; - other_dir = WRITE; goto dispatch_find_request; } @@ -560,7 +556,6 @@ dispatch_writes: dd->starved = 0; data_dir = WRITE; - other_dir = READ; goto dispatch_find_request; }