Thread (26 messages) 26 messages, 2 authors, 2024-05-01

Re: [PATCH v2 07/22] mm: Provide a means of invalidation without using launder_folio

From: David Howells <dhowells@redhat.com>
Date: 2024-05-01 11:51:23
Also in: ceph-devel, linux-cifs, linux-fsdevel, linux-mm, linux-nfs, lkml, netfs, v9fs
Subsystem: memory management, page cache, the rest · Maintainers: Andrew Morton, Matthew Wilcox, Jan Kara, Linus Torvalds

David Howells [off-list ref] wrote:
+			.range_start	= first,
+			.range_end	= last,
...
+	truncate_inode_pages_range(mapping, first, last);
These actually take file offsets and not page ranges and so the attached
change is needed.  Without this, the generic/412 xfstest fails.

David
---
diff --git a/mm/filemap.c b/mm/filemap.c
index 53516305b4b4..3916fc8b10e6 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -4171,15 +4171,15 @@ int filemap_invalidate_inode(struct inode *inode, bool flush,
 		struct writeback_control wbc = {
 			.sync_mode	= WB_SYNC_ALL,
 			.nr_to_write	= LONG_MAX,
-			.range_start	= first,
-			.range_end	= last,
+			.range_start	= start,
+			.range_end	= end,
 		};
 
 		filemap_fdatawrite_wbc(mapping, &wbc);
 	}
 
 	/* Wait for writeback to complete on all folios and discard. */
-	truncate_inode_pages_range(mapping, first, last);
+	truncate_inode_pages_range(mapping, start, end);
 
 unlock:
 	filemap_invalidate_unlock(mapping);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help