[PATCH 4/9] blk: Call unprep_fn from elv_abort_queue is available

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux