diff options
Diffstat (limited to 'block/elevator.c')
-rw-r--r-- | block/elevator.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/block/elevator.c b/block/elevator.c index a91fc59edd01..8a74eedc3530 100644 --- a/block/elevator.c +++ b/block/elevator.c | |||
@@ -914,6 +914,19 @@ int elv_may_queue(struct request_queue *q, int rw) | |||
914 | return ELV_MQUEUE_MAY; | 914 | return ELV_MQUEUE_MAY; |
915 | } | 915 | } |
916 | 916 | ||
917 | void elv_abort_queue(struct request_queue *q) | ||
918 | { | ||
919 | struct request *rq; | ||
920 | |||
921 | while (!list_empty(&q->queue_head)) { | ||
922 | rq = list_entry_rq(q->queue_head.next); | ||
923 | rq->cmd_flags |= REQ_QUIET; | ||
924 | blk_add_trace_rq(q, rq, BLK_TA_ABORT); | ||
925 | end_queued_request(rq, 0); | ||
926 | } | ||
927 | } | ||
928 | EXPORT_SYMBOL(elv_abort_queue); | ||
929 | |||
917 | void elv_completed_request(struct request_queue *q, struct request *rq) | 930 | void elv_completed_request(struct request_queue *q, struct request *rq) |
918 | { | 931 | { |
919 | elevator_t *e = q->elevator; | 932 | elevator_t *e = q->elevator; |