Commit d04c406f authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe
Browse files

block: clear REQ_HIPRI if polling is not supported



This prevents a HIPRI bio from being submitted through a stacking
driver that does not support polling and thus won't poll for I/O
completion.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent d6a51a97
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -921,6 +921,9 @@ generic_make_request_checks(struct bio *bio)
		}
		}
	}
	}


	if (!test_bit(QUEUE_FLAG_POLL, &q->queue_flags))
		bio->bi_opf &= ~REQ_HIPRI;

	switch (bio_op(bio)) {
	switch (bio_op(bio)) {
	case REQ_OP_DISCARD:
	case REQ_OP_DISCARD:
		if (!blk_queue_discard(q))
		if (!blk_queue_discard(q))