diff options
Diffstat (limited to 'drivers/block/cfq-iosched.c')
-rw-r--r-- | drivers/block/cfq-iosched.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/block/cfq-iosched.c b/drivers/block/cfq-iosched.c index 35f6e569d5e5..baa3e268250a 100644 --- a/drivers/block/cfq-iosched.c +++ b/drivers/block/cfq-iosched.c | |||
@@ -375,9 +375,10 @@ cfq_find_next_crq(struct cfq_data *cfqd, struct cfq_queue *cfqq, | |||
375 | struct cfq_rq *crq_next = NULL, *crq_prev = NULL; | 375 | struct cfq_rq *crq_next = NULL, *crq_prev = NULL; |
376 | struct rb_node *rbnext, *rbprev; | 376 | struct rb_node *rbnext, *rbprev; |
377 | 377 | ||
378 | rbnext = NULL; | ||
378 | if (ON_RB(&last->rb_node)) | 379 | if (ON_RB(&last->rb_node)) |
379 | rbnext = rb_next(&last->rb_node); | 380 | rbnext = rb_next(&last->rb_node); |
380 | else { | 381 | if (!rbnext) { |
381 | rbnext = rb_first(&cfqq->sort_list); | 382 | rbnext = rb_first(&cfqq->sort_list); |
382 | if (rbnext == &last->rb_node) | 383 | if (rbnext == &last->rb_node) |
383 | rbnext = NULL; | 384 | rbnext = NULL; |