Skip to content

Commit c077dc5

Browse files
ahunter6storulf
authored andcommitted
mmc: block: Fix request completion in the CQE timeout path
First, it should be noted that the CQE timeout (60 seconds) is substantial so a CQE request that times out is really stuck, and the race between timeout and completion is extremely unlikely. Nevertheless this patch fixes an issue with it. Commit ad73d6f ("mmc: complete requests from ->timeout") preserved the existing functionality, to complete the request. However that had only been necessary because the block layer timeout handler had been marking the request to prevent it from being completed normally. That restriction was removed at the same time, the result being that a request that has gone will have been completed anyway. That is, the completion was unnecessary. At the time, the unnecessary completion was harmless because the block layer would ignore it, although that changed in kernel v5.0. Note for stable, this patch will not apply cleanly without patch "mmc: core: Fix recursive locking issue in CQE recovery path" Signed-off-by: Adrian Hunter <[email protected]> Fixes: ad73d6f ("mmc: complete requests from ->timeout") Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 39a22f7 commit c077dc5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/mmc/core/queue.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@ static enum blk_eh_timer_return mmc_cqe_timed_out(struct request *req)
110110
mmc_cqe_recovery_notifier(mrq);
111111
return BLK_EH_RESET_TIMER;
112112
}
113-
/* No timeout (XXX: huh? comment doesn't make much sense) */
114-
blk_mq_complete_request(req);
113+
/* The request has gone already */
115114
return BLK_EH_DONE;
116115
default:
117116
/* Timeout is handled by mmc core */

0 commit comments

Comments
 (0)