summaryrefslogtreecommitdiffstats
path: root/drivers/block/deadline-iosched.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/deadline-iosched.c')
-rw-r--r--drivers/block/deadline-iosched.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/block/deadline-iosched.c b/drivers/block/deadline-iosched.c
index 24594c57c323..52a3ae5289a0 100644
--- a/drivers/block/deadline-iosched.c
+++ b/drivers/block/deadline-iosched.c
@@ -512,7 +512,10 @@ static int deadline_dispatch_requests(struct deadline_data *dd)
/*
* batches are currently reads XOR writes
*/
- drq = dd->next_drq[WRITE] ? : 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" */
OpenPOWER on IntegriCloud