Commit 72c4783210f77fd743f0a316858d33f27db51e7c

Authored by Konstantin Khlebnikov
Committed by Linus Torvalds
1 parent 76d3fbf8fb

mm: remove useless rcu lock-unlock from mapping_tagged()

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>

Showing 1 changed file with 1 additions and 5 deletions Side-by-side Diff

... ... @@ -1405,11 +1405,7 @@
1405 1405 */
1406 1406 int mapping_tagged(struct address_space *mapping, int tag)
1407 1407 {
1408   - int ret;
1409   - rcu_read_lock();
1410   - ret = radix_tree_tagged(&mapping->page_tree, tag);
1411   - rcu_read_unlock();
1412   - return ret;
  1408 + return radix_tree_tagged(&mapping->page_tree, tag);
1413 1409 }
1414 1410 EXPORT_SYMBOL(mapping_tagged);