linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
To: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
	linux-fsdevel@vger.kernel.org
Subject: [PATCH 3/5] ufs: Convert ufs_inode_getfrag() to take a folio
Date: Sat,  5 Oct 2024 19:02:06 +0100	[thread overview]
Message-ID: <20241005180214.3181728-4-willy@infradead.org> (raw)
In-Reply-To: <20241005180214.3181728-1-willy@infradead.org>

Pass bh->b_folio instead of bh->b_page.  They're in a union, so no
code change expected.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 fs/ufs/inode.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c
index 937d3b787d1e..a2be1bd301ee 100644
--- a/fs/ufs/inode.c
+++ b/fs/ufs/inode.c
@@ -252,10 +252,9 @@ ufs_extend_tail(struct inode *inode, u64 writes_to,
  * @new: we set it if we allocate new block
  * @locked_page: for ufs_new_fragments()
  */
-static u64
-ufs_inode_getfrag(struct inode *inode, unsigned index,
+static u64 ufs_inode_getfrag(struct inode *inode, unsigned index,
 		  sector_t new_fragment, int *err,
-		  int *new, struct page *locked_page)
+		  int *new, struct folio *locked_folio)
 {
 	struct ufs_inode_info *ufsi = UFS_I(inode);
 	struct super_block *sb = inode->i_sb;
@@ -288,7 +287,7 @@ ufs_inode_getfrag(struct inode *inode, unsigned index,
 			goal += uspi->s_fpb;
 	}
 	tmp = ufs_new_fragments(inode, p, ufs_blknum(new_fragment),
-				goal, nfrags, err, locked_page);
+				goal, nfrags, err, &locked_folio->page);
 
 	if (!tmp) {
 		*err = -ENOSPC;
@@ -440,7 +439,7 @@ static int ufs_getfrag_block(struct inode *inode, sector_t fragment, struct buff
 
 	if (depth == 1) {
 		phys64 = ufs_inode_getfrag(inode, offsets[0], fragment,
-					   &err, &new, bh_result->b_page);
+					   &err, &new, bh_result->b_folio);
 	} else {
 		int i;
 		phys64 = ufs_inode_getfrag(inode, offsets[0], fragment,
-- 
2.43.0


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

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-05 18:02 [PATCH 0/5] UFS: Final folio conversions Matthew Wilcox (Oracle)
2024-10-05 18:02 ` [PATCH 1/5] ufs: Convert ufs_inode_getblock() to take a folio Matthew Wilcox (Oracle)
2024-10-05 18:02 ` [PATCH 2/5] ufs: Convert ufs_extend_tail() " Matthew Wilcox (Oracle)
2024-10-05 18:02 ` Matthew Wilcox (Oracle) [this message]
2024-10-05 18:02 ` [PATCH 4/5] ufs: Pass a folio to ufs_new_fragments() Matthew Wilcox (Oracle)
2024-10-05 18:02 ` [PATCH 5/5] ufs: Convert ufs_change_blocknr() to take a folio Matthew Wilcox (Oracle)
2024-10-05 18:31 ` [PATCH 0/5] UFS: Final folio conversions Al Viro
2024-10-05 21:21   ` Al Viro

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=20241005180214.3181728-4-willy@infradead.org \
    --to=willy@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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).