Merge branch 'xarray' of git://git.infradead.org/users/willy/linux-dax
[platform/kernel/linux-starfive.git] / fs / btrfs / extent_io.c
index 6877a74..d228f70 100644 (file)
@@ -3784,7 +3784,7 @@ int btree_write_cache_pages(struct address_space *mapping,
        pgoff_t index;
        pgoff_t end;            /* Inclusive */
        int scanned = 0;
-       int tag;
+       xa_mark_t tag;
 
        pagevec_init(&pvec);
        if (wbc->range_cyclic) {
@@ -3909,7 +3909,7 @@ static int extent_write_cache_pages(struct address_space *mapping,
        pgoff_t done_index;
        int range_whole = 0;
        int scanned = 0;
-       int tag;
+       xa_mark_t tag;
 
        /*
         * We have to hold onto the inode so that ordered extents can do their
@@ -5159,11 +5159,9 @@ void clear_extent_buffer_dirty(struct extent_buffer *eb)
 
                clear_page_dirty_for_io(page);
                xa_lock_irq(&page->mapping->i_pages);
-               if (!PageDirty(page)) {
-                       radix_tree_tag_clear(&page->mapping->i_pages,
-                                               page_index(page),
-                                               PAGECACHE_TAG_DIRTY);
-               }
+               if (!PageDirty(page))
+                       __xa_clear_mark(&page->mapping->i_pages,
+                                       page_index(page), PAGECACHE_TAG_DIRTY);
                xa_unlock_irq(&page->mapping->i_pages);
                ClearPageError(page);
                unlock_page(page);