linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: SeongJae Park <sj@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: willy@infradead.org, Xiubo Li <xiubli@redhat.com>,
	Ilya Dryomov <idryomov@gmail.com>,
	Jeff Layton <jlayton@kernel.org>,
	ceph-devel@vger.kernel.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, SeongJae Park <sj@kernel.org>
Subject: [PATCH 3/3] fs/ceph/addr: use folio_headpage() instead of folio_page()
Date: Fri,  6 Jan 2023 17:40:28 +0000	[thread overview]
Message-ID: <20230106174028.151384-4-sj@kernel.org> (raw)
In-Reply-To: <20230106174028.151384-1-sj@kernel.org>

Using 'folio_page(folio, 0)' for getting the head page of a folios is
not the standard idiom and inefficient.  Replace the call in fs/ceph/ to
'folio_headpage()'.

Signed-off-by: SeongJae Park <sj@kernel.org>
---
 fs/ceph/addr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index 8c74871e37c9..b76e94152b21 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -1290,7 +1290,7 @@ static int ceph_netfs_check_write_begin(struct file *file, loff_t pos, unsigned
 	struct ceph_inode_info *ci = ceph_inode(inode);
 	struct ceph_snap_context *snapc;
 
-	snapc = ceph_find_incompatible(folio_page(*foliop, 0));
+	snapc = ceph_find_incompatible(folio_headpage(*foliop));
 	if (snapc) {
 		int r;
 
-- 
2.25.1


  parent reply	other threads:[~2023-01-06 17:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-06 17:40 [PATCH 0/3] add folio_headpage() macro SeongJae Park
2023-01-06 17:40 ` [PATCH 1/3] include/linux/page-flags: add folio_headpage() SeongJae Park
2023-01-06 17:40 ` [PATCH 2/3] mm: use folio_headpage() instead of folio_page() SeongJae Park
2023-01-06 19:37   ` Matthew Wilcox
2023-01-06 17:40 ` SeongJae Park [this message]
2023-01-06 19:39   ` [PATCH 3/3] fs/ceph/addr: " Matthew Wilcox
2023-01-06 19:21 ` [PATCH 0/3] add folio_headpage() macro Matthew Wilcox
2023-01-06 19:45   ` SeongJae Park
2023-01-09 11:35 ` Xiubo Li

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=20230106174028.151384-4-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=jlayton@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=willy@infradead.org \
    --cc=xiubli@redhat.com \
    /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).