diff mbox series

[1/3] netfs: Remove call to folio_index()

Message ID 20241005182307.3190401-2-willy@infradead.org (mailing list archive)
State New
Headers show
Series Random netfs folio fixes | expand

Commit Message

Matthew Wilcox Oct. 5, 2024, 6:23 p.m. UTC
Calling folio_index() is pointless overhead; directly dereferencing
folio->index is fine.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 include/trace/events/netfs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Howells Oct. 7, 2024, 2:13 p.m. UTC | #1
Matthew Wilcox (Oracle) <willy@infradead.org> wrote:

> Calling folio_index() is pointless overhead; directly dereferencing
> folio->index is fine.
> 
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>

Fixes: c38f4e96e605 ("netfs: Provide func to copy data to pagecache for buffered write")
Acked-by: David Howells <dhowells@redhat.com>
diff mbox series

Patch

diff --git a/include/trace/events/netfs.h b/include/trace/events/netfs.h
index 1d7c52821e55..72a208fd4496 100644
--- a/include/trace/events/netfs.h
+++ b/include/trace/events/netfs.h
@@ -451,7 +451,7 @@  TRACE_EVENT(netfs_folio,
 		    struct address_space *__m = READ_ONCE(folio->mapping);
 		    __entry->ino = __m ? __m->host->i_ino : 0;
 		    __entry->why = why;
-		    __entry->index = folio_index(folio);
+		    __entry->index = folio->index;
 		    __entry->nr = folio_nr_pages(folio);
 			   ),