linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] 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.
@ 2016-09-25 19:20 Sudip Midya
  2016-09-25 21:45 ` Dave Chinner
  0 siblings, 1 reply; 2+ messages in thread
From: Sudip Midya @ 2016-09-25 19:20 UTC (permalink / raw)
  To: xfs, david, hch

Signed-off-by: Sudip Midya <midya.sudip@gmail.com>
---
 fs/xfs/xfs_icache.c | 2 --
 1 file changed, 2 deletions(-)

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();
 }
 
 /*
-- 
1.9.1


_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] 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.
  2016-09-25 19:20 [PATCH] 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 Sudip Midya
@ 2016-09-25 21:45 ` Dave Chinner
  0 siblings, 0 replies; 2+ messages in thread
From: Dave Chinner @ 2016-09-25 21:45 UTC (permalink / raw)
  To: Sudip Midya; +Cc: xfs, hch, linux-xfs

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()?

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-25 21:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-25 19:20 [PATCH] 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 Sudip Midya
2016-09-25 21:45 ` Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).