minixfs: Convert minix_prepare_chunk() to take a folio

All callers now have a folio, so convert minix_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-09 20:59:00 -04:00 committed by Christian Brauner
parent da2c04c150
commit cf04e47128
No known key found for this signature in database
GPG Key ID: 91C61BC06578DCA2
3 changed files with 18 additions and 18 deletions

View File

@ -260,7 +260,7 @@ int minix_add_link(struct dentry *dentry, struct inode *inode)
got_it:
pos = folio_pos(folio) + offset_in_folio(folio, p);
err = minix_prepare_chunk(&folio->page, pos, sbi->s_dirsize);
err = minix_prepare_chunk(folio, pos, sbi->s_dirsize);
if (err)
goto out_unlock;
memcpy (namx, name, namelen);
@ -292,7 +292,7 @@ int minix_delete_entry(struct minix_dir_entry *de, struct folio *folio)
int err;
folio_lock(folio);
err = minix_prepare_chunk(&folio->page, pos, len);
err = minix_prepare_chunk(folio, pos, len);
if (err) {
folio_unlock(folio);
return err;
@ -316,7 +316,7 @@ int minix_make_empty(struct inode *inode, struct inode *dir)
if (IS_ERR(folio))
return PTR_ERR(folio);
err = minix_prepare_chunk(&folio->page, 0, 2 * sbi->s_dirsize);
err = minix_prepare_chunk(folio, 0, 2 * sbi->s_dirsize);
if (err) {
folio_unlock(folio);
goto fail;
@ -413,7 +413,7 @@ int minix_set_link(struct minix_dir_entry *de, struct folio *folio,
int err;
folio_lock(folio);
err = minix_prepare_chunk(&folio->page, pos, sbi->s_dirsize);
err = minix_prepare_chunk(folio, pos, sbi->s_dirsize);
if (err) {
folio_unlock(folio);
return err;

View File

@ -427,9 +427,9 @@ static int minix_read_folio(struct file *file, struct folio *folio)
return block_read_full_folio(folio, minix_get_block);
}
int minix_prepare_chunk(struct page *page, loff_t pos, unsigned len)
int minix_prepare_chunk(struct folio *folio, loff_t pos, unsigned len)
{
return __block_write_begin(page, pos, len, minix_get_block);
return __block_write_begin(&folio->page, pos, len, minix_get_block);
}
static void minix_write_failed(struct address_space *mapping, loff_t to)

View File

@ -42,18 +42,18 @@ struct minix_sb_info {
unsigned short s_version;
};
extern struct inode *minix_iget(struct super_block *, unsigned long);
extern struct minix_inode * minix_V1_raw_inode(struct super_block *, ino_t, struct buffer_head **);
extern struct minix2_inode * minix_V2_raw_inode(struct super_block *, ino_t, struct buffer_head **);
extern struct inode * minix_new_inode(const struct inode *, umode_t);
extern void minix_free_inode(struct inode * inode);
extern unsigned long minix_count_free_inodes(struct super_block *sb);
extern int minix_new_block(struct inode * inode);
extern void minix_free_block(struct inode *inode, unsigned long block);
extern unsigned long minix_count_free_blocks(struct super_block *sb);
extern int minix_getattr(struct mnt_idmap *, const struct path *,
struct kstat *, u32, unsigned int);
extern int minix_prepare_chunk(struct page *page, loff_t pos, unsigned len);
struct inode *minix_iget(struct super_block *, unsigned long);
struct minix_inode *minix_V1_raw_inode(struct super_block *, ino_t, struct buffer_head **);
struct minix2_inode *minix_V2_raw_inode(struct super_block *, ino_t, struct buffer_head **);
struct inode *minix_new_inode(const struct inode *, umode_t);
void minix_free_inode(struct inode *inode);
unsigned long minix_count_free_inodes(struct super_block *sb);
int minix_new_block(struct inode *inode);
void minix_free_block(struct inode *inode, unsigned long block);
unsigned long minix_count_free_blocks(struct super_block *sb);
int minix_getattr(struct mnt_idmap *, const struct path *,
struct kstat *, u32, unsigned int);
int minix_prepare_chunk(struct folio *folio, loff_t pos, unsigned len);
extern void V1_minix_truncate(struct inode *);
extern void V2_minix_truncate(struct inode *);