Skip to content

Commit 878eb6e

Browse files
Al Viroaxboe
Al Viro
authored andcommitted
block: blk_add_rq_to_plug(): clear stale 'last' after flush
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 <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 943f45b commit 878eb6e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

block/blk-mq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,6 +1262,7 @@ static void blk_add_rq_to_plug(struct blk_plug *plug, struct request *rq)
12621262
(!blk_queue_nomerges(rq->q) &&
12631263
blk_rq_bytes(last) >= BLK_PLUG_FLUSH_SIZE)) {
12641264
blk_mq_flush_plug_list(plug, false);
1265+
last = NULL;
12651266
trace_block_plug(rq->q);
12661267
}
12671268

0 commit comments

Comments
 (0)