Skip to content

Commit d9036c4

Browse files
Matthew Wilcox (Oracle)Al Viro
authored andcommitted
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) <[email protected]> Signed-off-by: Al Viro <[email protected]>
1 parent 6b103cc commit d9036c4

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

fs/ufs/inode.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -309,12 +309,11 @@ ufs_inode_getfrag(struct inode *inode, unsigned index,
309309
* (block will hold this fragment and also uspi->s_fpb-1)
310310
* @err: see ufs_inode_getfrag()
311311
* @new: see ufs_inode_getfrag()
312-
* @locked_page: see ufs_inode_getfrag()
312+
* @locked_folio: see ufs_inode_getfrag()
313313
*/
314-
static u64
315-
ufs_inode_getblock(struct inode *inode, u64 ind_block,
316-
unsigned index, sector_t new_fragment, int *err,
317-
int *new, struct page *locked_page)
314+
static u64 ufs_inode_getblock(struct inode *inode, u64 ind_block,
315+
unsigned index, sector_t new_fragment, int *err,
316+
int *new, struct folio *locked_folio)
318317
{
319318
struct super_block *sb = inode->i_sb;
320319
struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi;
@@ -349,7 +348,7 @@ ufs_inode_getblock(struct inode *inode, u64 ind_block,
349348
else
350349
goal = bh->b_blocknr + uspi->s_fpb;
351350
tmp = ufs_new_fragments(inode, p, ufs_blknum(new_fragment), goal,
352-
uspi->s_fpb, err, locked_page);
351+
uspi->s_fpb, err, &locked_folio->page);
353352
if (!tmp)
354353
goto out;
355354

@@ -430,7 +429,7 @@ static int ufs_getfrag_block(struct inode *inode, sector_t fragment, struct buff
430429
phys64 = ufs_inode_getblock(inode, phys64, offsets[i],
431430
fragment, &err, NULL, NULL);
432431
phys64 = ufs_inode_getblock(inode, phys64, offsets[depth - 1],
433-
fragment, &err, &new, bh_result->b_page);
432+
fragment, &err, &new, bh_result->b_folio);
434433
}
435434
out:
436435
if (phys64) {

0 commit comments

Comments
 (0)