We want to have a valid live gendisk to call ->poll and not just a request_queue, so call the right helper.
Showing the changes to block (1 of 1 file). Show all
Unified · Split
| @@ -943,7 +943,7 @@ int bio_poll(struct bio *bio, struct io_comp_batch *iob, unsigned int flags) · 942 unmodified lines | |||
| 943 | 943 | ||
| 944 | blk_flush_plug(current->plug, false); | 944 | blk_flush_plug(current->plug, false); |
| 945 | 945 | ||
| 946 | if (blk_queue_enter(q, BLK_MQ_REQ_NOWAIT)) | 946 | if (bio_queue_enter(bio)) |
| 947 | return 0; | 947 | return 0; |
| 948 | if (queue_is_mq(q)) { | 948 | if (queue_is_mq(q)) { |
| 949 | ret = blk_mq_poll(q, cookie, iob, flags); | 949 | ret = blk_mq_poll(q, cookie, iob, flags); |