Skip to content

Commit

Permalink
block: use bio_queue_enter instead of blk_queue_enter in bio_poll
Browse files Browse the repository at this point in the history
We want to have a valid live gendisk to call ->poll and not just a
request_queue, so call the right helper.

Fixes: 3e08773 ("block: switch polling to be bio based")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220523124302.526186-1-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Christoph Hellwig authored and axboe committed May 28, 2022
1 parent 98d40e7 commit ebd076b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ int bio_poll(struct bio *bio, struct io_comp_batch *iob, unsigned int flags)

blk_flush_plug(current->plug, false);

if (blk_queue_enter(q, BLK_MQ_REQ_NOWAIT))
if (bio_queue_enter(bio))
return 0;
if (queue_is_mq(q)) {
ret = blk_mq_poll(q, cookie, iob, flags);
Expand Down

0 comments on commit ebd076b

Please sign in to comment.