diff options
| -rw-r--r-- | block/blk-mq.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index a5ea37d7e820..e11f5f8e0313 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c | |||
| @@ -411,16 +411,7 @@ static void blk_mq_start_request(struct request *rq, bool last) | |||
| 411 | if (unlikely(blk_bidi_rq(rq))) | 411 | if (unlikely(blk_bidi_rq(rq))) |
| 412 | rq->next_rq->resid_len = blk_rq_bytes(rq->next_rq); | 412 | rq->next_rq->resid_len = blk_rq_bytes(rq->next_rq); |
| 413 | 413 | ||
| 414 | /* | 414 | blk_add_timer(rq); |
| 415 | * Just mark start time and set the started bit. Due to memory | ||
| 416 | * ordering, we know we'll see the correct deadline as long as | ||
| 417 | * REQ_ATOMIC_STARTED is seen. Use the default queue timeout, | ||
| 418 | * unless one has been set in the request. | ||
| 419 | */ | ||
| 420 | if (!rq->timeout) | ||
| 421 | rq->deadline = jiffies + q->rq_timeout; | ||
| 422 | else | ||
| 423 | rq->deadline = jiffies + rq->timeout; | ||
| 424 | 415 | ||
| 425 | /* | 416 | /* |
| 426 | * Mark us as started and clear complete. Complete might have been | 417 | * Mark us as started and clear complete. Complete might have been |
| @@ -972,11 +963,6 @@ static void __blk_mq_insert_request(struct blk_mq_hw_ctx *hctx, | |||
| 972 | list_add_tail(&rq->queuelist, &ctx->rq_list); | 963 | list_add_tail(&rq->queuelist, &ctx->rq_list); |
| 973 | 964 | ||
| 974 | blk_mq_hctx_mark_pending(hctx, ctx); | 965 | blk_mq_hctx_mark_pending(hctx, ctx); |
| 975 | |||
| 976 | /* | ||
| 977 | * We do this early, to ensure we are on the right CPU. | ||
| 978 | */ | ||
| 979 | blk_add_timer(rq); | ||
| 980 | } | 966 | } |
| 981 | 967 | ||
| 982 | void blk_mq_insert_request(struct request *rq, bool at_head, bool run_queue, | 968 | void blk_mq_insert_request(struct request *rq, bool at_head, bool run_queue, |
| @@ -1219,7 +1205,6 @@ static void blk_mq_make_request(struct request_queue *q, struct bio *bio) | |||
| 1219 | 1205 | ||
| 1220 | blk_mq_bio_to_request(rq, bio); | 1206 | blk_mq_bio_to_request(rq, bio); |
| 1221 | blk_mq_start_request(rq, true); | 1207 | blk_mq_start_request(rq, true); |
| 1222 | blk_add_timer(rq); | ||
| 1223 | 1208 | ||
| 1224 | /* | 1209 | /* |
| 1225 | * For OK queue, we are done. For error, kill it. Any other | 1210 | * For OK queue, we are done. For error, kill it. Any other |
