iomap: Fix iomap_invalidatepage tracepoint
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 9 Feb 2022 20:21:22 +0000 (20:21 +0000)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 14 Mar 2022 19:43:16 +0000 (15:43 -0400)
This tracepoint is defined to take an offset in the file, not an
offset in the folio.

Fixes: 1ac994525b9d ("iomap: Remove pgoff from tracepoints")
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Tested-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Acked-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Tested-by: Mike Marshall <hubcap@omnibond.com> # orangefs
Tested-by: David Howells <dhowells@redhat.com> # afs
fs/iomap/buffered-io.c

index 6c51a75..d020a2e 100644 (file)
@@ -480,7 +480,8 @@ EXPORT_SYMBOL_GPL(iomap_releasepage);
 
 void iomap_invalidate_folio(struct folio *folio, size_t offset, size_t len)
 {
-       trace_iomap_invalidatepage(folio->mapping->host, offset, len);
+       trace_iomap_invalidatepage(folio->mapping->host,
+                                       folio_pos(folio) + offset, len);
 
        /*
         * If we're invalidating the entire folio, clear the dirty state