Commit 0a943c65 authored by Matthew Wilcox's avatar Matthew Wilcox

btrfs: Convert page cache to XArray

Signed-off-by: default avatarMatthew Wilcox <willy@infradead.org>
Acked-by: default avatarDavid Sterba <dsterba@suse.com>
parent 7f4446ee
...@@ -437,9 +437,7 @@ static noinline int add_ra_bio_pages(struct inode *inode, ...@@ -437,9 +437,7 @@ static noinline int add_ra_bio_pages(struct inode *inode,
if (pg_index > end_index) if (pg_index > end_index)
break; break;
rcu_read_lock(); page = xa_load(&mapping->i_pages, pg_index);
page = radix_tree_lookup(&mapping->i_pages, pg_index);
rcu_read_unlock();
if (page && !xa_is_value(page)) { if (page && !xa_is_value(page)) {
misses++; misses++;
if (misses > 4) if (misses > 4)
......
...@@ -5153,11 +5153,9 @@ void clear_extent_buffer_dirty(struct extent_buffer *eb) ...@@ -5153,11 +5153,9 @@ void clear_extent_buffer_dirty(struct extent_buffer *eb)
clear_page_dirty_for_io(page); clear_page_dirty_for_io(page);
xa_lock_irq(&page->mapping->i_pages); xa_lock_irq(&page->mapping->i_pages);
if (!PageDirty(page)) { if (!PageDirty(page))
radix_tree_tag_clear(&page->mapping->i_pages, __xa_clear_mark(&page->mapping->i_pages,
page_index(page), page_index(page), PAGECACHE_TAG_DIRTY);
PAGECACHE_TAG_DIRTY);
}
xa_unlock_irq(&page->mapping->i_pages); xa_unlock_irq(&page->mapping->i_pages);
ClearPageError(page); ClearPageError(page);
unlock_page(page); unlock_page(page);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment