diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2024-07-09 20:59:00 -0400 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2024-08-07 11:31:57 +0200 |
commit | cf04e47128afd071bcb9d0c9806dce835f85356d (patch) | |
tree | 5e8340038f82cd59782f673d4ec05f05c84c62ff | |
parent | da2c04c15068adaf4a5cce0f47fd7aad97ac8c4f (diff) |
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>
-rw-r--r-- | fs/minix/dir.c | 8 | ||||
-rw-r--r-- | fs/minix/inode.c | 4 | ||||
-rw-r--r-- | fs/minix/minix.h | 24 |
3 files changed, 18 insertions, 18 deletions
diff --git a/fs/minix/dir.c b/fs/minix/dir.c index 15b3ef1e473c..26bfea508028 100644 --- a/fs/minix/dir.c +++ b/fs/minix/dir.c @@ -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; diff --git a/fs/minix/inode.c b/fs/minix/inode.c index 1c3df63162ef..0002337977e0 100644 --- a/fs/minix/inode.c +++ b/fs/minix/inode.c @@ -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) diff --git a/fs/minix/minix.h b/fs/minix/minix.h index 063bab8faa6b..d54273c3c9ff 100644 --- a/fs/minix/minix.h +++ b/fs/minix/minix.h @@ -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 *); |