提交 7910da2d 编写于 作者: P Pavel Begunkov 提交者: Xiaoguang Wang

io-wq: use BIT for ulong hash

to #28170604

commit 3684f24653534c71c7dc9f44d7281a838f4e4979 upstream

@hash_map is unsigned long, but BIT_ULL() is used for manipulations.
BIT() is a better match as it returns exactly unsigned long value.
Signed-off-by: NPavel Begunkov <asml.silence@gmail.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
Acked-by: NJoseph Qi <joseph.qi@linux.alibaba.com>
Signed-off-by: NXiaoguang Wang <xiaoguang.wang@linux.alibaba.com>
上级 e7c00972
...@@ -394,8 +394,8 @@ static struct io_wq_work *io_get_next_work(struct io_wqe *wqe, unsigned *hash) ...@@ -394,8 +394,8 @@ static struct io_wq_work *io_get_next_work(struct io_wqe *wqe, unsigned *hash)
/* hashed, can run if not already running */ /* hashed, can run if not already running */
*hash = work->flags >> IO_WQ_HASH_SHIFT; *hash = work->flags >> IO_WQ_HASH_SHIFT;
if (!(wqe->hash_map & BIT_ULL(*hash))) { if (!(wqe->hash_map & BIT(*hash))) {
wqe->hash_map |= BIT_ULL(*hash); wqe->hash_map |= BIT(*hash);
wq_node_del(&wqe->work_list, node, prev); wq_node_del(&wqe->work_list, node, prev);
return work; return work;
} }
...@@ -513,7 +513,7 @@ static void io_worker_handle_work(struct io_worker *worker) ...@@ -513,7 +513,7 @@ static void io_worker_handle_work(struct io_worker *worker)
spin_lock_irq(&wqe->lock); spin_lock_irq(&wqe->lock);
if (hash != -1U) { if (hash != -1U) {
wqe->hash_map &= ~BIT_ULL(hash); wqe->hash_map &= ~BIT(hash);
wqe->flags &= ~IO_WQE_FLAG_STALLED; wqe->flags &= ~IO_WQE_FLAG_STALLED;
} }
if (work && work != old_work) { if (work && work != old_work) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册