diff options
Diffstat (limited to 'block/blk-core.c')
-rw-r--r-- | block/blk-core.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 10e8a64a5a5b..7a779d7c69c9 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -1637,6 +1637,28 @@ int blk_insert_cloned_request(struct request_queue *q, struct request *rq) | |||
1637 | EXPORT_SYMBOL_GPL(blk_insert_cloned_request); | 1637 | EXPORT_SYMBOL_GPL(blk_insert_cloned_request); |
1638 | 1638 | ||
1639 | /** | 1639 | /** |
1640 | * blkdev_dequeue_request - dequeue request and start timeout timer | ||
1641 | * @req: request to dequeue | ||
1642 | * | ||
1643 | * Dequeue @req and start timeout timer on it. This hands off the | ||
1644 | * request to the driver. | ||
1645 | * | ||
1646 | * Block internal functions which don't want to start timer should | ||
1647 | * call elv_dequeue_request(). | ||
1648 | */ | ||
1649 | void blkdev_dequeue_request(struct request *req) | ||
1650 | { | ||
1651 | elv_dequeue_request(req->q, req); | ||
1652 | |||
1653 | /* | ||
1654 | * We are now handing the request to the hardware, add the | ||
1655 | * timeout handler. | ||
1656 | */ | ||
1657 | blk_add_timer(req); | ||
1658 | } | ||
1659 | EXPORT_SYMBOL(blkdev_dequeue_request); | ||
1660 | |||
1661 | /** | ||
1640 | * __end_that_request_first - end I/O on a request | 1662 | * __end_that_request_first - end I/O on a request |
1641 | * @req: the request being processed | 1663 | * @req: the request being processed |
1642 | * @error: %0 for success, < %0 for error | 1664 | * @error: %0 for success, < %0 for error |
@@ -1774,7 +1796,7 @@ static void end_that_request_last(struct request *req, int error) | |||
1774 | blk_queue_end_tag(req->q, req); | 1796 | blk_queue_end_tag(req->q, req); |
1775 | 1797 | ||
1776 | if (blk_queued_rq(req)) | 1798 | if (blk_queued_rq(req)) |
1777 | blkdev_dequeue_request(req); | 1799 | elv_dequeue_request(req->q, req); |
1778 | 1800 | ||
1779 | if (unlikely(laptop_mode) && blk_fs_request(req)) | 1801 | if (unlikely(laptop_mode) && blk_fs_request(req)) |
1780 | laptop_io_completion(); | 1802 | laptop_io_completion(); |