From: Zqiang <qiang.zhang1211@gmail.com>
To: axboe@kernel.dk, asml.silence@gmail.com, io-uring@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Zqiang <qiang.zhang1211@gmail.com>
Subject: [PATCH] io-wq: Remove unnecessary rcu_read_lock/unlock() in raw spinlock critical section
Date: Tue, 26 Oct 2021 11:23:04 +0800 [thread overview]
Message-ID: <20211026032304.30323-1-qiang.zhang1211@gmail.com> (raw)
Due to raw_spin_lock/unlock() contains preempt_disable/enable() action,
already regarded as RCU critical region, so remove unnecessary
rcu_read_lock/unlock().
Signed-off-by: Zqiang <qiang.zhang1211@gmail.com>
---
fs/io-wq.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/io-wq.c b/fs/io-wq.c
index cd88602e2e81..401be005d089 100644
--- a/fs/io-wq.c
+++ b/fs/io-wq.c
@@ -855,9 +855,7 @@ static void io_wqe_enqueue(struct io_wqe *wqe, struct io_wq_work *work)
io_wqe_insert_work(wqe, work);
clear_bit(IO_ACCT_STALLED_BIT, &acct->flags);
- rcu_read_lock();
do_create = !io_wqe_activate_free_worker(wqe, acct);
- rcu_read_unlock();
raw_spin_unlock(&wqe->lock);
--
2.17.1
next reply other threads:[~2021-10-26 3:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-26 3:23 Zqiang [this message]
2021-10-26 10:32 ` Muchun Song
2021-10-26 14:47 ` Jens Axboe
2021-10-27 7:06 ` Zqiang
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=20211026032304.30323-1-qiang.zhang1211@gmail.com \
--to=qiang.zhang1211@gmail.com \
--cc=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=io-uring@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®