summaryrefslogtreecommitdiffstats
path: root/fs/ufs
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2024-10-05 19:02:08 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2024-10-18 17:35:31 -0400
commitb57c010e70ff11cce7f6b702d2e3bba1d893580b (patch)
tree4054c525f2b05b111f87c823620f04462b69fcae /fs/ufs
parent14bcb7bb68094f3a8bb7dd8a6a87db910b596f19 (diff)
downloadlinux-stable-b57c010e70ff11cce7f6b702d2e3bba1d893580b.tar.gz
linux-stable-b57c010e70ff11cce7f6b702d2e3bba1d893580b.tar.bz2
linux-stable-b57c010e70ff11cce7f6b702d2e3bba1d893580b.zip
ufs: Convert ufs_change_blocknr() to take a folio
Now that ufs_new_fragments() has a folio, pass it to ufs_change_blocknr() as a folio instead of converting it from folio to page to folio. This removes the last use of struct page in UFS. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ufs')
-rw-r--r--fs/ufs/balloc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ufs/balloc.c b/fs/ufs/balloc.c
index e578e429c5d8..194ed3ab945e 100644
--- a/fs/ufs/balloc.c
+++ b/fs/ufs/balloc.c
@@ -229,13 +229,13 @@ failed:
* situated at the end of file.
*
* We can come here from ufs_writepage or ufs_prepare_write,
- * locked_page is argument of these functions, so we already lock it.
+ * locked_folio is argument of these functions, so we already lock it.
*/
static void ufs_change_blocknr(struct inode *inode, sector_t beg,
unsigned int count, sector_t oldb,
- sector_t newb, struct page *locked_page)
+ sector_t newb, struct folio *locked_folio)
{
- struct folio *folio, *locked_folio = page_folio(locked_page);
+ struct folio *folio;
const unsigned blks_per_page =
1 << (PAGE_SHIFT - inode->i_blkbits);
const unsigned mask = blks_per_page - 1;
@@ -461,7 +461,7 @@ u64 ufs_new_fragments(struct inode *inode, void *p, u64 fragment,
mutex_unlock(&UFS_SB(sb)->s_lock);
ufs_change_blocknr(inode, fragment - oldcount, oldcount,
uspi->s_sbbase + tmp,
- uspi->s_sbbase + result, &locked_folio->page);
+ uspi->s_sbbase + result, locked_folio);
*err = 0;
write_seqlock(&UFS_I(inode)->meta_lock);
ufs_cpu_to_data_ptr(sb, p, result);