summaryrefslogtreecommitdiff
path: root/block/blk-timeout.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/blk-timeout.c')
-rw-r--r--block/blk-timeout.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/block/blk-timeout.c b/block/blk-timeout.c
index 6427be7ac363..4f04cd1e0b74 100644
--- a/block/blk-timeout.c
+++ b/block/blk-timeout.c
@@ -156,12 +156,17 @@ void blk_timeout_work(struct work_struct *work)
*/
void blk_abort_request(struct request *req)
{
- if (blk_mark_rq_complete(req))
- return;
-
if (req->q->mq_ops) {
- blk_mq_rq_timed_out(req, false);
+ /*
+ * All we need to ensure is that timeout scan takes place
+ * immediately and that scan sees the new timeout value.
+ * No need for fancy synchronizations.
+ */
+ req->deadline = jiffies;
+ mod_timer(&req->q->timeout, 0);
} else {
+ if (blk_mark_rq_complete(req))
+ return;
blk_delete_timer(req);
blk_rq_timed_out(req);
}