This is a note to let you know that I've just added the patch titled block: blk_add_rq_to_plug(): clear stale 'last' after flush to the 6.0-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: block-blk_add_rq_to_plug-clear-stale-last-after-flus.patch and it can be found in the queue-6.0 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 82eddad3d0378870b3c2f2693fb494657a510d9c Author: Al Viro <viro@xxxxxxxxxxxxxxxxxx> Date: Tue Nov 1 00:54:13 2022 +0000 block: blk_add_rq_to_plug(): clear stale 'last' after flush [ Upstream commit 878eb6e48f240d02ed1c9298020a0b6370695f24 ] blk_mq_flush_plug_list() empties ->mq_list and request we'd peeked there before that call is gone; in any case, we are not dealing with a mix of requests for different queues now - there's no requests left in the plug. Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx> Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/block/blk-mq.c b/block/blk-mq.c index edf41959a705..4402e4ecb8b1 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1183,6 +1183,7 @@ static void blk_add_rq_to_plug(struct blk_plug *plug, struct request *rq) (!blk_queue_nomerges(rq->q) && blk_rq_bytes(last) >= BLK_PLUG_FLUSH_SIZE)) { blk_mq_flush_plug_list(plug, false); + last = NULL; trace_block_plug(rq->q); }