Skip to content

Commit 334e5a8

Browse files
committed
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"
2 parents 8fd06d4 + 81ea122 commit 334e5a8

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

block/blk-mq.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2878,16 +2878,15 @@ static inline struct request *blk_mq_get_cached_request(struct request_queue *q,
28782878

28792879
if (!plug)
28802880
return NULL;
2881+
rq = rq_list_peek(&plug->cached_rq);
2882+
if (!rq || rq->q != q)
2883+
return NULL;
28812884

28822885
if (blk_mq_attempt_bio_merge(q, *bio, nsegs)) {
28832886
*bio = NULL;
28842887
return NULL;
28852888
}
28862889

2887-
rq = rq_list_peek(&plug->cached_rq);
2888-
if (!rq || rq->q != q)
2889-
return NULL;
2890-
28912890
type = blk_mq_get_hctx_type((*bio)->bi_opf);
28922891
hctx_type = rq->mq_hctx->type;
28932892
if (type != hctx_type &&

0 commit comments

Comments
 (0)