summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2013-09-18 14:33:55 (GMT)
committerJens Axboe <axboe@kernel.dk>2013-09-18 14:33:55 (GMT)
commit7652113c2f508b1c8176640dcd034730fe79bc48 (patch)
tree826a32d8341f9747f997db6715f6cb4a802d618a /block
parentadbe6991efd36104ac9eaf751993d35eaa7f493a (diff)
downloadlinux-7652113c2f508b1c8176640dcd034730fe79bc48.tar.xz
If the queue is dying then we only call the rq->end_io callout.
This leaves bios setup on the request, because the caller assumes when the blk_execute_rq_nowait/blk_execute_rq call has completed that the rq->bios have been cleaned up. This patch has blk_execute_rq_nowait use __blk_end_request_all to free bios and also call rq->end_io. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r--block/blk-exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-exec.c b/block/blk-exec.c
index e706213..ae4f27d 100644
--- a/block/blk-exec.c
+++ b/block/blk-exec.c
@@ -68,9 +68,9 @@ void blk_execute_rq_nowait(struct request_queue *q, struct gendisk *bd_disk,
spin_lock_irq(q->queue_lock);
if (unlikely(blk_queue_dying(q))) {
+ rq->cmd_flags |= REQ_QUIET;
rq->errors = -ENXIO;
- if (rq->end_io)
- rq->end_io(rq, rq->errors);
+ __blk_end_request_all(rq, rq->errors);
spin_unlock_irq(q->queue_lock);
return;
}