aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--block/elevator.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/block/elevator.c b/block/elevator.c
index cacfff7418e4..e4c58827bb46 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -541,33 +541,19 @@ int elv_queue_empty(request_queue_t *q)
541 541
542struct request *elv_latter_request(request_queue_t *q, struct request *rq) 542struct request *elv_latter_request(request_queue_t *q, struct request *rq)
543{ 543{
544 struct list_head *next;
545
546 elevator_t *e = q->elevator; 544 elevator_t *e = q->elevator;
547 545
548 if (e->ops->elevator_latter_req_fn) 546 if (e->ops->elevator_latter_req_fn)
549 return e->ops->elevator_latter_req_fn(q, rq); 547 return e->ops->elevator_latter_req_fn(q, rq);
550
551 next = rq->queuelist.next;
552 if (next != &q->queue_head && next != &rq->queuelist)
553 return list_entry_rq(next);
554
555 return NULL; 548 return NULL;
556} 549}
557 550
558struct request *elv_former_request(request_queue_t *q, struct request *rq) 551struct request *elv_former_request(request_queue_t *q, struct request *rq)
559{ 552{
560 struct list_head *prev;
561
562 elevator_t *e = q->elevator; 553 elevator_t *e = q->elevator;
563 554
564 if (e->ops->elevator_former_req_fn) 555 if (e->ops->elevator_former_req_fn)
565 return e->ops->elevator_former_req_fn(q, rq); 556 return e->ops->elevator_former_req_fn(q, rq);
566
567 prev = rq->queuelist.prev;
568 if (prev != &q->queue_head && prev != &rq->queuelist)
569 return list_entry_rq(prev);
570
571 return NULL; 557 return NULL;
572} 558}
573 559