提交 769e6837 编写于 作者: P Pavel Begunkov 提交者: Jens Axboe

io-wq: don't repeat IO_WQ_BIT_EXIT check by worker

io_wqe_worker()'s main loop does check IO_WQ_BIT_EXIT flag, so no need
for a second test_bit at the end as it will immediately jump to the
first check afterwards.
Signed-off-by: NPavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/d6af4a51c86523a527fb5417c9fbc775c4b26497.1623634181.git.asml.silence@gmail.comSigned-off-by: NJens Axboe <axboe@kernel.dk>
上级 eef51daa
...@@ -559,8 +559,7 @@ static int io_wqe_worker(void *data) ...@@ -559,8 +559,7 @@ static int io_wqe_worker(void *data)
if (ret) if (ret)
continue; continue;
/* timed out, exit unless we're the fixed worker */ /* timed out, exit unless we're the fixed worker */
if (test_bit(IO_WQ_BIT_EXIT, &wq->state) || if (!(worker->flags & IO_WORKER_F_FIXED))
!(worker->flags & IO_WORKER_F_FIXED))
break; break;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册