diff options
author | Nick Piggin <npiggin@suse.de> | 2007-10-16 01:24:40 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 09:42:53 -0700 |
commit | 001281881067a5998384c6669bc8dbbbab8456c4 (patch) | |
tree | 6229d16c737782a36795354b218c74d4d2749752 /mm/page-writeback.c | |
parent | 557ed1fa2620dc119adb86b34c614e152a629a80 (diff) | |
download | kernel-crypto-001281881067a5998384c6669bc8dbbbab8456c4.tar.gz kernel-crypto-001281881067a5998384c6669bc8dbbbab8456c4.tar.xz kernel-crypto-001281881067a5998384c6669bc8dbbbab8456c4.zip |
mm: use lockless radix-tree probe
Probing pages and radix_tree_tagged are lockless operations with the lockless
radix-tree. Convert these users to RCU locking rather than using tree_lock.
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page-writeback.c')
-rw-r--r-- | mm/page-writeback.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 44720363374..2adb8995988 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -1022,17 +1022,15 @@ int test_set_page_writeback(struct page *page) EXPORT_SYMBOL(test_set_page_writeback); /* - * Return true if any of the pages in the mapping are marged with the + * Return true if any of the pages in the mapping are marked with the * passed tag. */ int mapping_tagged(struct address_space *mapping, int tag) { - unsigned long flags; int ret; - - read_lock_irqsave(&mapping->tree_lock, flags); + rcu_read_lock(); ret = radix_tree_tagged(&mapping->page_tree, tag); - read_unlock_irqrestore(&mapping->tree_lock, flags); + rcu_read_unlock(); return ret; } EXPORT_SYMBOL(mapping_tagged); |