diff --git a/block/blk-mq.c b/block/blk-mq.c index a429004747d2b568f798695b1df9dcdbc9c4d1f1..1ed46ed09d084fc5db258fade16d38d857f304ec 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1892,7 +1892,7 @@ static blk_qc_t blk_mq_make_request(struct request_queue *q, struct bio *bio) { const int is_sync = op_is_sync(bio->bi_opf); const int is_flush_fua = op_is_flush(bio->bi_opf); - struct blk_mq_alloc_data data = { .flags = 0, .cmd_flags = bio->bi_opf }; + struct blk_mq_alloc_data data = { .flags = 0}; struct request *rq; unsigned int request_count = 0; struct blk_plug *plug; @@ -1915,6 +1915,7 @@ static blk_qc_t blk_mq_make_request(struct request_queue *q, struct bio *bio) rq_qos_throttle(q, bio, NULL); + data.cmd_flags = bio->bi_opf; rq = blk_mq_get_request(q, bio, &data); if (unlikely(!rq)) { rq_qos_cleanup(q, bio);