summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-04-21 20:05:52 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2023-04-21 20:05:52 +0300
commit334e5a8206af93818fd384300666cc203f08f035 (patch)
tree1c12f5113c89d64a19fae6f149d099b3eae7551a
parent8fd06d441e35cc9543b410f9cb9aaa8e54ece38d (diff)
parent81ea1222f2fa5006f4b9759c2fe1ec154109622d (diff)
downloadlinux-334e5a8206af93818fd384300666cc203f08f035.tar.xz
Merge tag 'block-6.3-2023-04-21' of git://git.kernel.dk/linux
Pull block fix from Jens Axboe: "Just a single revert of a patch from the 6.3 series" * tag 'block-6.3-2023-04-21' of git://git.kernel.dk/linux: Revert "block: Merge bio before checking ->cached_rq"
-rw-r--r--block/blk-mq.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index f0ea9dcfb966..2831f78f86a0 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2878,16 +2878,15 @@ static inline struct request *blk_mq_get_cached_request(struct request_queue *q,
if (!plug)
return NULL;
+ rq = rq_list_peek(&plug->cached_rq);
+ if (!rq || rq->q != q)
+ return NULL;
if (blk_mq_attempt_bio_merge(q, *bio, nsegs)) {
*bio = NULL;
return NULL;
}
- rq = rq_list_peek(&plug->cached_rq);
- if (!rq || rq->q != q)
- return NULL;
-
type = blk_mq_get_hctx_type((*bio)->bi_opf);
hctx_type = rq->mq_hctx->type;
if (type != hctx_type &&