public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH 5/5] io-wq: use BIT for ulong hash
Date: Fri, 28 Feb 2020 10:36:39 +0300	[thread overview]
Message-ID: <332610e11bc94acb2390f737ecb0b08db120cb8c.1582874853.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>

@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: Pavel Begunkov <[email protected]>
---
 fs/io-wq.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/io-wq.c b/fs/io-wq.c
index 1ceb12c58ae6..a05c32df2046 100644
--- a/fs/io-wq.c
+++ b/fs/io-wq.c
@@ -393,8 +393,8 @@ static struct io_wq_work *io_get_next_work(struct io_wqe *wqe, unsigned *hash)
 
 		/* hashed, can run if not already running */
 		*hash = work->flags >> IO_WQ_HASH_SHIFT;
-		if (!(wqe->hash_map & BIT_ULL(*hash))) {
-			wqe->hash_map |= BIT_ULL(*hash);
+		if (!(wqe->hash_map & BIT(*hash))) {
+			wqe->hash_map |= BIT(*hash);
 			wq_node_del(&wqe->work_list, node, prev);
 			return work;
 		}
@@ -512,7 +512,7 @@ static void io_worker_handle_work(struct io_worker *worker)
 		spin_lock_irq(&wqe->lock);
 
 		if (hash != -1U) {
-			wqe->hash_map &= ~BIT_ULL(hash);
+			wqe->hash_map &= ~BIT(hash);
 			wqe->flags &= ~IO_WQE_FLAG_STALLED;
 		}
 		if (work && work != old_work) {
-- 
2.24.0


  parent reply	other threads:[~2020-02-28  7:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-28  7:36 [PATCH 0/5] random io-wq and io_uring bits Pavel Begunkov
2020-02-28  7:36 ` [PATCH 1/5] io_uring: clean io_poll_complete Pavel Begunkov
2020-02-28  7:36 ` [PATCH 2/5] io_uring: extract kmsg copy helper Pavel Begunkov
2020-02-28  7:36 ` [PATCH 3/5] io-wq: remove unused IO_WQ_WORK_HAS_MM Pavel Begunkov
2020-02-28  7:36 ` [PATCH 4/5] io_uring: remove IO_WQ_WORK_CB Pavel Begunkov
2020-02-28  7:36 ` Pavel Begunkov [this message]
2020-02-28 14:07 ` [PATCH 0/5] random io-wq and io_uring bits Jens Axboe
2020-02-28 14:26 ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=332610e11bc94acb2390f737ecb0b08db120cb8c.1582874853.git.asml.silence@gmail.com \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox