Skip to content

Commit

Permalink
block: check for timeout function in blk_rq_timed_out()
Browse files Browse the repository at this point in the history
rq_timed_out_fn might have been unset while the request
was in flight, so we need to check for it in blk_rq_timed_out().

Acked-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
hreinecke authored and Martin Schwidefsky committed Jul 1, 2013
1 parent d1ffc1f commit 80bd718
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions block/blk-timeout.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,10 @@ void blk_delete_timer(struct request *req)
static void blk_rq_timed_out(struct request *req)
{
struct request_queue *q = req->q;
enum blk_eh_timer_return ret;
enum blk_eh_timer_return ret = BLK_EH_RESET_TIMER;

ret = q->rq_timed_out_fn(req);
if (q->rq_timed_out_fn)
ret = q->rq_timed_out_fn(req);
switch (ret) {
case BLK_EH_HANDLED:
__blk_complete_request(req);
Expand Down

0 comments on commit 80bd718

Please sign in to comment.