]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
f2fs: convert f2fs_clear_page_cache_dirty_tag to use a folio
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Tue, 23 Apr 2024 22:55:33 +0000 (23:55 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 6 May 2024 00:53:47 +0000 (17:53 -0700)
Removes uses of page_mapping() and page_index().

Link: https://lkml.kernel.org/r/20240423225552.4113447-3-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: Eric Biggers <ebiggers@google.com>
Cc: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/f2fs/data.c

index d9494b5fc7c185e5088dd12885a5e9758cfd4011..961e6ff77c72352fb38bcc808953d70e3679cc47 100644 (file)
@@ -4082,11 +4082,12 @@ const struct address_space_operations f2fs_dblock_aops = {
 
 void f2fs_clear_page_cache_dirty_tag(struct page *page)
 {
-       struct address_space *mapping = page_mapping(page);
+       struct folio *folio = page_folio(page);
+       struct address_space *mapping = folio->mapping;
        unsigned long flags;
 
        xa_lock_irqsave(&mapping->i_pages, flags);
-       __xa_clear_mark(&mapping->i_pages, page_index(page),
+       __xa_clear_mark(&mapping->i_pages, folio->index,
                                                PAGECACHE_TAG_DIRTY);
        xa_unlock_irqrestore(&mapping->i_pages, flags);
 }