Skip to contentSkip to conversation

block: use bio_queue_enter instead of blk_queue_enter in bio_poll

PATCH Applied Christoph Hellwig 2 participants 2 messages May 23, 2022 – May 28, 2022 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block: use bio_queue_enter instead of blk_queue_enter in bio_poll

We want to have a valid live gendisk to call ->poll and not just a request_queue, so call the right helper.

Fixes 3e08773c3841 ("block: switch polling to be bio based")
---
 block/blk-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
block/blk-core.c +1 -1
index 80fa73c419a99..06ff5bbfe8f66 100644
@@ -939,7 +939,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);
Signature · 1 line
2.30.2
maintainer Applied
#1 lore raw
Quoted 4 lines · Christoph Hellwig

We want to have a valid live gendisk to call ->poll and not just a request_queue, so call the right helper.

Applied, thanks!

[1/1] block: use bio_queue_enter instead of blk_queue_enter in bio_poll
(no commit info)

Best regards,

Signature · 1 line
Jens Axboe