diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2007-09-21 04:41:07 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2007-10-16 05:03:53 -0400 |
commit | a0cd128542cd9c67f27458a08e989db486a293ce (patch) | |
tree | bc4ca6dd3cbfa230de486d79480f7a99bbfb6232 /block/elevator.c | |
parent | 992c5ddaf1b8b85d2252339c4c89adf7469c09ca (diff) |
block: add end_queued_request() and end_dequeued_request() helpers
We can use this helper in the elevator core for BLKPREP_KILL, and it'll
also be useful for the empty barrier patch.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/elevator.c')
-rw-r--r-- | block/elevator.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/block/elevator.c b/block/elevator.c index b9c518afe1f8..ec23ca02f2fe 100644 --- a/block/elevator.c +++ b/block/elevator.c | |||
@@ -751,15 +751,8 @@ struct request *elv_next_request(struct request_queue *q) | |||
751 | rq = NULL; | 751 | rq = NULL; |
752 | break; | 752 | break; |
753 | } else if (ret == BLKPREP_KILL) { | 753 | } else if (ret == BLKPREP_KILL) { |
754 | int nr_bytes = rq->hard_nr_sectors << 9; | ||
755 | |||
756 | if (!nr_bytes) | ||
757 | nr_bytes = rq->data_len; | ||
758 | |||
759 | blkdev_dequeue_request(rq); | ||
760 | rq->cmd_flags |= REQ_QUIET; | 754 | rq->cmd_flags |= REQ_QUIET; |
761 | end_that_request_chunk(rq, 0, nr_bytes); | 755 | end_queued_request(rq, 0); |
762 | end_that_request_last(rq, 0); | ||
763 | } else { | 756 | } else { |
764 | printk(KERN_ERR "%s: bad return=%d\n", __FUNCTION__, | 757 | printk(KERN_ERR "%s: bad return=%d\n", __FUNCTION__, |
765 | ret); | 758 | ret); |