ufs: Convert ufs_inode_getblock() to take a folio

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>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Matthew Wilcox (Oracle) 2024-10-05 19:02:04 +01:00 committed by Al Viro
parent 6b103cc0ba
commit d9036c488c

View File

@ -309,12 +309,11 @@ out:
* (block will hold this fragment and also uspi->s_fpb-1) * (block will hold this fragment and also uspi->s_fpb-1)
* @err: see ufs_inode_getfrag() * @err: see ufs_inode_getfrag()
* @new: see ufs_inode_getfrag() * @new: see ufs_inode_getfrag()
* @locked_page: see ufs_inode_getfrag() * @locked_folio: see ufs_inode_getfrag()
*/ */
static u64 static u64 ufs_inode_getblock(struct inode *inode, u64 ind_block,
ufs_inode_getblock(struct inode *inode, u64 ind_block, unsigned index, sector_t new_fragment, int *err,
unsigned index, sector_t new_fragment, int *err, int *new, struct folio *locked_folio)
int *new, struct page *locked_page)
{ {
struct super_block *sb = inode->i_sb; struct super_block *sb = inode->i_sb;
struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi; struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi;
@ -349,7 +348,7 @@ ufs_inode_getblock(struct inode *inode, u64 ind_block,
else else
goal = bh->b_blocknr + uspi->s_fpb; goal = bh->b_blocknr + uspi->s_fpb;
tmp = ufs_new_fragments(inode, p, ufs_blknum(new_fragment), goal, tmp = ufs_new_fragments(inode, p, ufs_blknum(new_fragment), goal,
uspi->s_fpb, err, locked_page); uspi->s_fpb, err, &locked_folio->page);
if (!tmp) if (!tmp)
goto out; goto out;
@ -430,7 +429,7 @@ static int ufs_getfrag_block(struct inode *inode, sector_t fragment, struct buff
phys64 = ufs_inode_getblock(inode, phys64, offsets[i], phys64 = ufs_inode_getblock(inode, phys64, offsets[i],
fragment, &err, NULL, NULL); fragment, &err, NULL, NULL);
phys64 = ufs_inode_getblock(inode, phys64, offsets[depth - 1], phys64 = ufs_inode_getblock(inode, phys64, offsets[depth - 1],
fragment, &err, &new, bh_result->b_page); fragment, &err, &new, bh_result->b_folio);
} }
out: out:
if (phys64) { if (phys64) {