block: change elevator to use __blk_end_request()
This patch converts elevator to use __blk_end_request() directly so that end_{queued|dequeued}_request() can be removed. Related 'uptodate' arguments is converted to 'error'. Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com> Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
parent
7afb3a6e75
commit
99cd3386f2
|
@ -754,7 +754,7 @@ struct request *elv_next_request(struct request_queue *q)
|
||||||
* not ever see it.
|
* not ever see it.
|
||||||
*/
|
*/
|
||||||
if (blk_empty_barrier(rq)) {
|
if (blk_empty_barrier(rq)) {
|
||||||
end_queued_request(rq, 1);
|
__blk_end_request(rq, 0, blk_rq_bytes(rq));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!(rq->cmd_flags & REQ_STARTED)) {
|
if (!(rq->cmd_flags & REQ_STARTED)) {
|
||||||
|
@ -825,7 +825,7 @@ struct request *elv_next_request(struct request_queue *q)
|
||||||
break;
|
break;
|
||||||
} else if (ret == BLKPREP_KILL) {
|
} else if (ret == BLKPREP_KILL) {
|
||||||
rq->cmd_flags |= REQ_QUIET;
|
rq->cmd_flags |= REQ_QUIET;
|
||||||
end_queued_request(rq, 0);
|
__blk_end_request(rq, -EIO, blk_rq_bytes(rq));
|
||||||
} else {
|
} else {
|
||||||
printk(KERN_ERR "%s: bad return=%d\n", __func__, ret);
|
printk(KERN_ERR "%s: bad return=%d\n", __func__, ret);
|
||||||
break;
|
break;
|
||||||
|
@ -922,7 +922,7 @@ void elv_abort_queue(struct request_queue *q)
|
||||||
rq = list_entry_rq(q->queue_head.next);
|
rq = list_entry_rq(q->queue_head.next);
|
||||||
rq->cmd_flags |= REQ_QUIET;
|
rq->cmd_flags |= REQ_QUIET;
|
||||||
blk_add_trace_rq(q, rq, BLK_TA_ABORT);
|
blk_add_trace_rq(q, rq, BLK_TA_ABORT);
|
||||||
end_queued_request(rq, 0);
|
__blk_end_request(rq, -EIO, blk_rq_bytes(rq));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(elv_abort_queue);
|
EXPORT_SYMBOL(elv_abort_queue);
|
||||||
|
|
Loading…
Reference in a new issue