lkml.org 
[lkml]   [2021]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] io-wq: Remove unnecessary rcu_read_lock/unlock() in raw spinlock critical section
Date
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
\
 
 \ /
  Last update: 2021-10-26 05:25    [W:0.050 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site