diff --git a/block/elevator.c b/block/elevator.c index cacfff7418e459c235faf026ebcafad7d77708bd..e4c58827bb4660bc21bef638a3c9a926b2fc49c1 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -541,33 +541,19 @@ int elv_queue_empty(request_queue_t *q) struct request *elv_latter_request(request_queue_t *q, struct request *rq) { - struct list_head *next; - elevator_t *e = q->elevator; if (e->ops->elevator_latter_req_fn) return e->ops->elevator_latter_req_fn(q, rq); - - next = rq->queuelist.next; - if (next != &q->queue_head && next != &rq->queuelist) - return list_entry_rq(next); - return NULL; } struct request *elv_former_request(request_queue_t *q, struct request *rq) { - struct list_head *prev; - elevator_t *e = q->elevator; if (e->ops->elevator_former_req_fn) return e->ops->elevator_former_req_fn(q, rq); - - prev = rq->queuelist.prev; - if (prev != &q->queue_head && prev != &rq->queuelist) - return list_entry_rq(prev); - return NULL; }