blk-mq: Fix timeout handling in case the timeout handler returns BLK_EH_DONE
Changes
2 files changed · +1 −1
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| block/blk-mq.c | modified | +0 | −1 | View file |
| block/blk-timeout.c | modified | +1 | −0 | View file |
block/blk-mq.c
View filediff --git a/block/blk-mq.c b/block/blk-mq.c
index 8e57b84..b6888ff 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -781,7 +781,6 @@ static void blk_mq_rq_timed_out(struct request *req, bool reserved)
WARN_ON_ONCE(ret != BLK_EH_RESET_TIMER);
}
- req->rq_flags &= ~RQF_TIMED_OUT;
blk_add_timer(req);
}
block/blk-timeout.c
View filediff --git a/block/blk-timeout.c b/block/blk-timeout.c
index 4b8a48d..f2cfd56 100644
--- a/block/blk-timeout.c
+++ b/block/blk-timeout.c
@@ -210,6 +210,7 @@ void blk_add_timer(struct request *req)
if (!req->timeout)
req->timeout = q->rq_timeout;
+ req->rq_flags &= ~RQF_TIMED_OUT;
blk_rq_set_deadline(req, jiffies + req->timeout);
/*