Skip to content

Commit

Permalink
block: blk_add_rq_to_plug(): clear stale 'last' after flush
Browse files Browse the repository at this point in the history
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@zeniv.linux.org.uk>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Al Viro authored and Jens Axboe committed Nov 1, 2022
1 parent 943f45b commit 878eb6e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions block/blk-mq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1262,6 +1262,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);
}

Expand Down

0 comments on commit 878eb6e

Please sign in to comment.