提交 0820bb2f 编写于 作者: J Jens Axboe 提交者: Cheng Jian

io-wq: io_wqe_run_queue() doesn't need to use list_empty_careful()

mainline inclusion
from mainline-91d666ea undefined
commit 91d666ea
category: feature
bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=27
CVE: NA
---------------------------

We hold the wqe lock at this point (which is also annotated), so there's
no need to use the careful variant of list_empty().
Signed-off-by: NJens Axboe <axboe@kernel.dk>
Signed-off-by: NZhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Nyangerkun <yangerkun@huawei.com>
Reviewed-by: Nzhangyi (F) <yi.zhang@huawei.com>
Signed-off-by: NCheng Jian <cj.chengjian@huawei.com>
上级 191ef349
...@@ -339,8 +339,7 @@ static void io_worker_handle_work(struct io_worker *worker) ...@@ -339,8 +339,7 @@ static void io_worker_handle_work(struct io_worker *worker)
static inline bool io_wqe_run_queue(struct io_wqe *wqe) static inline bool io_wqe_run_queue(struct io_wqe *wqe)
__must_hold(wqe->lock) __must_hold(wqe->lock)
{ {
if (!list_empty_careful(&wqe->work_list) && if (!list_empty(&wqe->work_list) && !(wqe->flags & IO_WQE_FLAG_STALLED))
!(wqe->flags & IO_WQE_FLAG_STALLED))
return true; return true;
return false; return false;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册