mm: Convert __do_page_cache_readahead to XArray
authorMatthew Wilcox <willy@infradead.org>
Mon, 4 Dec 2017 09:30:18 +0000 (04:30 -0500)
committerMatthew Wilcox <willy@infradead.org>
Sun, 21 Oct 2018 14:46:37 +0000 (10:46 -0400)
This one is trivial.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
mm/readahead.c

index fc4dd364b37a67646845b235dec9240c6731cc20..f3d6f9656a3cc83c93420210dd938b8d0b54648e 100644 (file)
@@ -176,9 +176,7 @@ unsigned int __do_page_cache_readahead(struct address_space *mapping,
                if (page_offset > end_index)
                        break;
 
-               rcu_read_lock();
-               page = radix_tree_lookup(&mapping->i_pages, page_offset);
-               rcu_read_unlock();
+               page = xa_load(&mapping->i_pages, page_offset);
                if (page && !xa_is_value(page)) {
                        /*
                         * Page already present?  Kick off the current batch of