Call the unprep_fn for the queue if it has been set for requests that have been prepped indicated by REQ_DONTPREP being set. Signed-off-by: Mike Anderson <andmike@xxxxxxxxxxxxxxxxxx> Cc: Jens Axobe <jens.axboe@xxxxxxxxxx> --- block/elevator.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/block/elevator.c b/block/elevator.c index ac98008..1f1e942 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -817,8 +817,12 @@ void elv_abort_queue(struct request_queue *q) list_splice_init(&q->queue_head, &list); list_for_each_entry_safe(rq, tmp, &list, queuelist) { - if (rq->cmd_flags & REQ_DONTPREP) - continue; + if (rq->cmd_flags & REQ_DONTPREP) { + if (q->unprep_rq_fn) + q->unprep_rq_fn(q, rq); + else + continue; + } rq->cmd_flags |= REQ_QUIET; trace_block_rq_abort(q, rq); /* -- 1.6.6.1 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html