diff mbox

mm: remove unnecessary rcu_lock/unlock around radix_tree_tagged lockless function. The function queue_delayed_work is already protected with interrupts disabled, hence no need to add rcu_lock/unlock.

Message ID 20160925192005.GA6517@sudip-Dell-System-Vostro-3450 (mailing list archive)
State Not Applicable
Headers show

Commit Message

sudip midya Sept. 25, 2016, 7:20 p.m. UTC
Signed-off-by: Sudip Midya <midya.sudip@gmail.com>
 fs/xfs/xfs_icache.c | 2 --
 1 file changed, 2 deletions(-)


Dave Chinner Sept. 25, 2016, 9:45 p.m. UTC | #1
On Mon, Sep 26, 2016 at 12:50:06AM +0530, Sudip Midya wrote:
> Signed-off-by: Sudip Midya <midya.sudip@gmail.com>
> ---

Patch format still needs work. The subject line should be short, the
patch description should be in the body of the message, not the
subject. Also, this is not a patch for the "mm" subsystem.

Addressing the reason given for the change: the RCU lock is not
actually protecting queue_delayed_work(), so while the code change
may be OK, the reason given for removing it is not. So why is it
safe to remove the rcu_read_lock()?


diff mbox


diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c
index fb39a66..887c868 100644
--- a/fs/xfs/xfs_icache.c
+++ b/fs/xfs/xfs_icache.c
@@ -153,12 +153,10 @@  xfs_reclaim_work_queue(
 	struct xfs_mount        *mp)
-	rcu_read_lock();
 	if (radix_tree_tagged(&mp->m_perag_tree, XFS_ICI_RECLAIM_TAG)) {
 		queue_delayed_work(mp->m_reclaim_workqueue, &mp->m_reclaim_work,
 			msecs_to_jiffies(xfs_syncd_centisecs / 6 * 10));
-	rcu_read_unlock();