From: Konstantin Khlebnikov <khlebnikov@openvz.org>
To: Andrew Morton <akpm@linux-foundation.org>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH] mm: remove useless rcu lock-unlock from mapping_tagged()
Date: Sun, 17 Jul 2011 15:35:23 +0400 [thread overview]
Message-ID: <20110717113522.17196.13682.stgit@localhost6> (raw)
radix_tree_tagged() is lockless, it does not require any protection.
Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
---
mm/page-writeback.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 31f6988..919b45e 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -1405,10 +1405,6 @@ EXPORT_SYMBOL(test_set_page_writeback);
*/
int mapping_tagged(struct address_space *mapping, int tag)
{
- int ret;
- rcu_read_lock();
- ret = radix_tree_tagged(&mapping->page_tree, tag);
- rcu_read_unlock();
- return ret;
+ return radix_tree_tagged(&mapping->page_tree, tag);
}
EXPORT_SYMBOL(mapping_tagged);
next reply other threads:[~2011-07-17 11:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-17 11:35 Konstantin Khlebnikov [this message]
2011-07-19 20:55 ` [PATCH] mm: remove useless rcu lock-unlock from mapping_tagged() Paul E. McKenney
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=20110717113522.17196.13682.stgit@localhost6 \
--to=khlebnikov@openvz.org \
--cc=akpm@linux-foundation.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