aboutsummaryrefslogtreecommitdiffstats
path: root/block/elevator.c
diff options
context:
space:
mode:
authorKiyoshi Ueda <k-ueda@ct.jp.nec.com>2008-10-01 10:13:44 -0400
committerJens Axboe <jens.axboe@oracle.com>2008-10-09 02:56:21 -0400
commit99cd3386f290eaf61f2b7596d5a4cc2007771174 (patch)
tree90f93246c060a33b90d0ef3d98f327768f167909 /block/elevator.c
parent7afb3a6e752503d5ebeb038336aa0fa886a51b44 (diff)
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>
Diffstat (limited to 'block/elevator.c')
-rw-r--r--block/elevator.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/block/elevator.c b/block/elevator.c
index 8a74eedc3530..04518921db31 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -754,7 +754,7 @@ struct request *elv_next_request(struct request_queue *q)
754 * not ever see it. 754 * not ever see it.
755 */ 755 */
756 if (blk_empty_barrier(rq)) { 756 if (blk_empty_barrier(rq)) {
757 end_queued_request(rq, 1); 757 __blk_end_request(rq, 0, blk_rq_bytes(rq));
758 continue; 758 continue;
759 } 759 }
760 if (!(rq->cmd_flags & REQ_STARTED)) { 760 if (!(rq->cmd_flags & REQ_STARTED)) {
@@ -825,7 +825,7 @@ struct request *elv_next_request(struct request_queue *q)
825 break; 825 break;
826 } else if (ret == BLKPREP_KILL) { 826 } else if (ret == BLKPREP_KILL) {
827 rq->cmd_flags |= REQ_QUIET; 827 rq->cmd_flags |= REQ_QUIET;
828 end_queued_request(rq, 0); 828 __blk_end_request(rq, -EIO, blk_rq_bytes(rq));
829 } else { 829 } else {
830 printk(KERN_ERR "%s: bad return=%d\n", __func__, ret); 830 printk(KERN_ERR "%s: bad return=%d\n", __func__, ret);
831 break; 831 break;
@@ -922,7 +922,7 @@ void elv_abort_queue(struct request_queue *q)
922 rq = list_entry_rq(q->queue_head.next); 922 rq = list_entry_rq(q->queue_head.next);
923 rq->cmd_flags |= REQ_QUIET; 923 rq->cmd_flags |= REQ_QUIET;
924 blk_add_trace_rq(q, rq, BLK_TA_ABORT); 924 blk_add_trace_rq(q, rq, BLK_TA_ABORT);
925 end_queued_request(rq, 0); 925 __blk_end_request(rq, -EIO, blk_rq_bytes(rq));
926 } 926 }
927} 927}
928EXPORT_SYMBOL(elv_abort_queue); 928EXPORT_SYMBOL(elv_abort_queue);