summaryrefslogtreecommitdiff
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-12-14 17:21:22 +0100
committerJens Axboe <axboe@kernel.dk>2018-12-16 09:01:38 -0700
commitd04c406f29d9f4dbcb5eb5aa79ce0445c7e9d652 (patch)
tree34fac229a9abf2d6b9e9fe98b01118485bfeeced /block/blk-core.c
parentd6a51a97c0b2e21fec224746c2683ff739bcf4ae (diff)
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: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r--block/blk-core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index fa661bac40af..c78042975737 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -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)) {
case REQ_OP_DISCARD:
if (!blk_queue_discard(q))