Skip to content

Commit 7652113

Browse files
Mike Christieaxboe
authored andcommitted
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 <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent adbe699 commit 7652113

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

block/blk-exec.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ void blk_execute_rq_nowait(struct request_queue *q, struct gendisk *bd_disk,
6868
spin_lock_irq(q->queue_lock);
6969

7070
if (unlikely(blk_queue_dying(q))) {
71+
rq->cmd_flags |= REQ_QUIET;
7172
rq->errors = -ENXIO;
72-
if (rq->end_io)
73-
rq->end_io(rq, rq->errors);
73+
__blk_end_request_all(rq, rq->errors);
7474
spin_unlock_irq(q->queue_lock);
7575
return;
7676
}

0 commit comments

Comments
 (0)