Thread (108 messages) 108 messages, 3 authors, 2021-05-06
STALE1855d
Revisions (3)
  1. v9 current
  2. v13 [diff vs current]
  3. v14 [diff vs current]

[PATCH v9 86/96] iomap: Convert iomap_invalidatepage to use a folio

From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Date: 2021-05-05 17:46:25
Also in: linux-fsdevel, lkml
Subsystem: filesystems (vfs and infrastructure), filesystems [iomap], the rest · Maintainers: Alexander Viro, Christian Brauner, Linus Torvalds

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>
---
 fs/iomap/buffered-io.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index 33226a32e5c5..c36e16b87c45 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -478,15 +478,15 @@ iomap_invalidatepage(struct page *page, unsigned int offset, unsigned int len)
 {
 	struct folio *folio = page_folio(page);
 
-	trace_iomap_invalidatepage(page->mapping->host, offset, len);
+	trace_iomap_invalidatepage(folio->mapping->host, offset, len);
 
 	/*
 	 * If we are invalidating the entire page, clear the dirty state from it
 	 * and release it to avoid unnecessary buildup of the LRU.
 	 */
 	if (offset == 0 && len == PAGE_SIZE) {
-		WARN_ON_ONCE(PageWriteback(page));
-		cancel_dirty_page(page);
+		WARN_ON_ONCE(folio_writeback(folio));
+		folio_cancel_dirty(folio);
 		iomap_page_release(folio);
 	}
 }
-- 
2.30.2

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help