From 063640229e7706fa9e5b7f87b7736bf4b8aff57f Mon Sep 17 00:00:00 2001 From: Nick Piggin Date: Tue, 16 Oct 2007 01:24:40 -0700 Subject: [PATCH] --- yaml --- r: 69604 b: refs/heads/master c: 001281881067a5998384c6669bc8dbbbab8456c4 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/mm/page-writeback.c | 8 +++----- trunk/mm/readahead.c | 6 ++---- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index c72bf34e442d..99b8b35dd899 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 557ed1fa2620dc119adb86b34c614e152a629a80 +refs/heads/master: 001281881067a5998384c6669bc8dbbbab8456c4 diff --git a/trunk/mm/page-writeback.c b/trunk/mm/page-writeback.c index 44720363374c..2adb89959885 100644 --- a/trunk/mm/page-writeback.c +++ b/trunk/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); diff --git a/trunk/mm/readahead.c b/trunk/mm/readahead.c index fc52f9f1b80c..c5c8981469e7 100644 --- a/trunk/mm/readahead.c +++ b/trunk/mm/readahead.c @@ -149,20 +149,19 @@ __do_page_cache_readahead(struct address_space *mapping, struct file *filp, /* * Preallocate as many pages as we will need. */ - read_lock_irq(&mapping->tree_lock); for (page_idx = 0; page_idx < nr_to_read; page_idx++) { pgoff_t page_offset = offset + page_idx; if (page_offset > end_index) break; + rcu_read_lock(); page = radix_tree_lookup(&mapping->page_tree, page_offset); + rcu_read_unlock(); if (page) continue; - read_unlock_irq(&mapping->tree_lock); page = page_cache_alloc_cold(mapping); - read_lock_irq(&mapping->tree_lock); if (!page) break; page->index = page_offset; @@ -171,7 +170,6 @@ __do_page_cache_readahead(struct address_space *mapping, struct file *filp, SetPageReadahead(page); ret++; } - read_unlock_irq(&mapping->tree_lock); /* * Now start the IO. We ignore I/O errors - if the page is not