Commit 082a5bf2 authored by Yunlong.Xing's avatar Yunlong.Xing Committed by Treehugger Robot
Browse files

UPSTREAM: mmc:block:fix in_flight[issue_type] value error



For a completed request, after the mmc_blk_mq_complete_rq(mq, req)
function is executed, the bitmap_tags corresponding to the
request will be cleared, that is, the request will be regarded as
idle. If the request is acquired by a different type of process at
this time, the issue_type of the request may change. It further
caused the value of mq->in_flight[issue_type] to be abnormal,
and a large number of requests could not be sent.

p1:					      p2:
mmc_blk_mq_complete_rq
  blk_mq_free_request
					      blk_mq_get_request
					        blk_mq_rq_ctx_init
mmc_blk_mq_dec_in_flight
  mmc_issue_type(mq, req)

This strategy can ensure the consistency of issue_type
before and after executing mmc_blk_mq_complete_rq.

Fixes: 81196976 ("mmc: block: Add blk-mq support")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarYibin Ding <yibin.ding@unisoc.com>
Acked-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20230802023023.1318134-1-yunlong.xing@unisoc.com


Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Bug: 301055894
Change-Id: Id5aac66676b8632edc2b72c7105e0a4fa427652f
(cherry picked from commit 4b430d4a)
Signed-off-by: default avatarYunlong.Xing <Yunlong.Xing@unisoc.com>
parent 87478bda
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment