]> www.infradead.org Git - users/willy/linux.git/commitdiff
iomap: Convert iomap_releasepage to use a folio
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 28 Apr 2021 11:51:36 +0000 (07:51 -0400)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 16 Dec 2021 20:49:52 +0000 (15:49 -0500)
This is an address_space operation, so its argument must remain as a
struct page, but we can use a folio internally.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
fs/iomap/buffered-io.c

index 16604f60535728a31598a17f9d6ba1795fec18ce..b0192b148c9f95edb1a6827b1899c8e4a9d76144 100644 (file)
@@ -464,15 +464,15 @@ iomap_releasepage(struct page *page, gfp_t gfp_mask)
 {
        struct folio *folio = page_folio(page);
 
-       trace_iomap_releasepage(page->mapping->host, page_offset(page),
-                       PAGE_SIZE);
+       trace_iomap_releasepage(folio->mapping->host, folio_pos(folio),
+                       folio_size(folio));
 
        /*
         * mm accommodates an old ext3 case where clean pages might not have had
         * the dirty bit cleared. Thus, it can send actual dirty pages to
         * ->releasepage() via shrink_active_list(); skip those here.
         */
-       if (PageDirty(page) || PageWriteback(page))
+       if (folio_test_dirty(folio) || folio_test_writeback(folio))
                return 0;
        iomap_page_release(folio);
        return 1;