Message ID | 20241005182307.3190401-2-willy@infradead.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Random netfs folio fixes | expand |
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 --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); ),
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(-)