linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
To: David Howells <dhowells@redhat.com>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
	netfs@lists.linux.dev, linux-fsdevel@vger.kernel.org
Subject: [PATCH 1/3] netfs: Remove call to folio_index()
Date: Sat,  5 Oct 2024 19:23:03 +0100	[thread overview]
Message-ID: <20241005182307.3190401-2-willy@infradead.org> (raw)
In-Reply-To: <20241005182307.3190401-1-willy@infradead.org>

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(-)

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);
 			   ),
 
-- 
2.43.0


  reply	other threads:[~2024-10-05 18:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-05 18:23 [PATCH 0/3] Random netfs folio fixes Matthew Wilcox (Oracle)
2024-10-05 18:23 ` Matthew Wilcox (Oracle) [this message]
2024-10-05 18:23 ` [PATCH 2/3] netfs: Fix a few minor bugs in netfs_page_mkwrite() Matthew Wilcox (Oracle)
2024-10-05 18:23 ` [PATCH 3/3] netfs: Remove unnecessary references to pages Matthew Wilcox (Oracle)
2024-10-07 11:46 ` [PATCH 0/3] Random netfs folio fixes Christian Brauner
2024-10-07 14:13 ` [PATCH 1/3] netfs: Remove call to folio_index() David Howells
2024-10-07 14:14 ` [PATCH 2/3] netfs: Fix a few minor bugs in netfs_page_mkwrite() David Howells
2024-10-07 14:14 ` [PATCH 3/3] netfs: Remove unnecessary references to pages David Howells
2024-10-07 14:15 ` [PATCH 0/3] Random netfs folio fixes David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241005182307.3190401-2-willy@infradead.org \
    --to=willy@infradead.org \
    --cc=dhowells@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=netfs@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).