Skip to content

Commit 3e3876d

Browse files
Ming Leiaxboe
authored andcommitted
block: null_blk: end timed out poll request
When poll request is timed out, it is removed from the poll list, but not completed, so the request is leaked, and never get chance to complete. Fix the issue by ending it in timeout handler. Fixes: 0a593fb ("null_blk: poll queue support") Signed-off-by: Ming Lei <ming.lei@redhat.com> Link: https://lore.kernel.org/r/20220413084836.1571995-1-ming.lei@redhat.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 8535c01 commit 3e3876d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/block/null_blk/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1600,7 +1600,7 @@ static enum blk_eh_timer_return null_timeout_rq(struct request *rq, bool res)
16001600
* Only fake timeouts need to execute blk_mq_complete_request() here.
16011601
*/
16021602
cmd->error = BLK_STS_TIMEOUT;
1603-
if (cmd->fake_timeout)
1603+
if (cmd->fake_timeout || hctx->type == HCTX_TYPE_POLL)
16041604
blk_mq_complete_request(rq);
16051605
return BLK_EH_DONE;
16061606
}

0 commit comments

Comments
 (0)