diff options
author | Ming Lei <ming.lei@redhat.com> | 2022-04-13 16:48:36 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-04-14 10:16:33 -0600 |
commit | 3e3876d322aef82416ecc496a4d4a587e0fdf7a3 (patch) | |
tree | 1abc55a28b782f33bd0c931110159031048a710b /drivers | |
parent | 8535c0185d14ea41f0efd6a357961b05daf6687e (diff) | |
download | linux-stable-3e3876d322aef82416ecc496a4d4a587e0fdf7a3.tar.gz linux-stable-3e3876d322aef82416ecc496a4d4a587e0fdf7a3.tar.bz2 linux-stable-3e3876d322aef82416ecc496a4d4a587e0fdf7a3.zip |
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: 0a593fbbc245 ("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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/null_blk/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c index 05b1120e6623..c441a4972064 100644 --- a/drivers/block/null_blk/main.c +++ b/drivers/block/null_blk/main.c @@ -1600,7 +1600,7 @@ static enum blk_eh_timer_return null_timeout_rq(struct request *rq, bool res) * Only fake timeouts need to execute blk_mq_complete_request() here. */ cmd->error = BLK_STS_TIMEOUT; - if (cmd->fake_timeout) + if (cmd->fake_timeout || hctx->type == HCTX_TYPE_POLL) blk_mq_complete_request(rq); return BLK_EH_DONE; } |