|
@@ -149,20 +149,19 @@ __do_page_cache_readahead(struct address_space *mapping, struct file *filp,
|
|
/*
|
|
/*
|
|
* Preallocate as many pages as we will need.
|
|
* 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++) {
|
|
for (page_idx = 0; page_idx < nr_to_read; page_idx++) {
|
|
pgoff_t page_offset = offset + page_idx;
|
|
pgoff_t page_offset = offset + page_idx;
|
|
|
|
|
|
if (page_offset > end_index)
|
|
if (page_offset > end_index)
|
|
break;
|
|
break;
|
|
|
|
|
|
|
|
+ rcu_read_lock();
|
|
page = radix_tree_lookup(&mapping->page_tree, page_offset);
|
|
page = radix_tree_lookup(&mapping->page_tree, page_offset);
|
|
|
|
+ rcu_read_unlock();
|
|
if (page)
|
|
if (page)
|
|
continue;
|
|
continue;
|
|
|
|
|
|
- read_unlock_irq(&mapping->tree_lock);
|
|
|
|
page = page_cache_alloc_cold(mapping);
|
|
page = page_cache_alloc_cold(mapping);
|
|
- read_lock_irq(&mapping->tree_lock);
|
|
|
|
if (!page)
|
|
if (!page)
|
|
break;
|
|
break;
|
|
page->index = page_offset;
|
|
page->index = page_offset;
|
|
@@ -171,7 +170,6 @@ __do_page_cache_readahead(struct address_space *mapping, struct file *filp,
|
|
SetPageReadahead(page);
|
|
SetPageReadahead(page);
|
|
ret++;
|
|
ret++;
|
|
}
|
|
}
|
|
- read_unlock_irq(&mapping->tree_lock);
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
* Now start the IO. We ignore I/O errors - if the page is not
|
|
* Now start the IO. We ignore I/O errors - if the page is not
|