ufs: Convert ufs_prepare_chunk() to take a folio

All callers now have a folio, so convert ufs_prepare_chunk() to take one.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
Matthew Wilcox (Oracle) 2024-07-08 17:47:06 -04:00 committed by Christian Brauner
parent f4a20e53ab
commit 128d1e89ac
No known key found for this signature in database
GPG Key ID: 91C61BC06578DCA2
3 changed files with 9 additions and 9 deletions

View File

@ -97,7 +97,7 @@ void ufs_set_link(struct inode *dir, struct ufs_dir_entry *de,
int err;
folio_lock(folio);
err = ufs_prepare_chunk(&folio->page, pos, len);
err = ufs_prepare_chunk(folio, pos, len);
BUG_ON(err);
de->d_ino = cpu_to_fs32(dir->i_sb, inode->i_ino);
@ -366,7 +366,7 @@ int ufs_add_link(struct dentry *dentry, struct inode *inode)
got_it:
pos = folio_pos(folio) + offset_in_folio(folio, de);
err = ufs_prepare_chunk(&folio->page, pos, rec_len);
err = ufs_prepare_chunk(folio, pos, rec_len);
if (err)
goto out_unlock;
if (de->d_ino) {
@ -521,7 +521,7 @@ int ufs_delete_entry(struct inode *inode, struct ufs_dir_entry *dir,
from = offset_in_folio(folio, pde);
pos = folio_pos(folio) + from;
folio_lock(folio);
err = ufs_prepare_chunk(&folio->page, pos, to - from);
err = ufs_prepare_chunk(folio, pos, to - from);
BUG_ON(err);
if (pde)
pde->d_reclen = cpu_to_fs16(sb, to - from);
@ -549,7 +549,7 @@ int ufs_make_empty(struct inode * inode, struct inode *dir)
if (IS_ERR(folio))
return PTR_ERR(folio);
err = ufs_prepare_chunk(&folio->page, 0, chunk_size);
err = ufs_prepare_chunk(folio, 0, chunk_size);
if (err) {
folio_unlock(folio);
goto fail;

View File

@ -479,9 +479,9 @@ static int ufs_read_folio(struct file *file, struct folio *folio)
return block_read_full_folio(folio, ufs_getfrag_block);
}
int ufs_prepare_chunk(struct page *page, loff_t pos, unsigned len)
int ufs_prepare_chunk(struct folio *folio, loff_t pos, unsigned len)
{
return __block_write_begin(page, pos, len, ufs_getfrag_block);
return __block_write_begin(&folio->page, pos, len, ufs_getfrag_block);
}
static void ufs_truncate_blocks(struct inode *);

View File

@ -250,9 +250,9 @@ ufs_set_inode_gid(struct super_block *sb, struct ufs_inode *inode, u32 value)
}
}
extern dev_t ufs_get_inode_dev(struct super_block *, struct ufs_inode_info *);
extern void ufs_set_inode_dev(struct super_block *, struct ufs_inode_info *, dev_t);
extern int ufs_prepare_chunk(struct page *page, loff_t pos, unsigned len);
dev_t ufs_get_inode_dev(struct super_block *, struct ufs_inode_info *);
void ufs_set_inode_dev(struct super_block *, struct ufs_inode_info *, dev_t);
int ufs_prepare_chunk(struct folio *folio, loff_t pos, unsigned len);
/*
* These functions manipulate ufs buffers