Skip to content

Commit

Permalink
mm: remove useless rcu lock-unlock from mapping_tagged()
Browse files Browse the repository at this point in the history
radix_tree_tagged() is lockless - it reads from a member of the raid-tree
root node.  It does not require any protection.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Konstantin Khlebnikov authored and Linus Torvalds committed Jul 26, 2011
1 parent 76d3fbf commit 72c4783
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions mm/page-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit 72c4783

Please sign in to comment.