In blk_hctx_poll, it always check task is running or not, and return 1 if task is running, it's not reasonable for current caller, especially io_uring, which is always running and cause BLK_POLL_ONESHOT is set. It looks like there has been this judgment for historical reasons, and in very early versions of this function the user would set the process state to TASK_UNINTERRUPTIBLE. Signed-off-by: Diangang Li Signed-off-by: Fengnan Chang --- block/blk-mq.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 0b8b72194003..b0eb90c50afb 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -5172,8 +5172,6 @@ static int blk_hctx_poll(struct request_queue *q, struct blk_mq_hw_ctx *hctx, if (signal_pending_state(state, current)) __set_current_state(TASK_RUNNING); - if (task_is_running(current)) - return 1; if (ret < 0 || (flags & BLK_POLL_ONESHOT)) break; -- 2.39.5 (Apple Git-154)