summaryrefslogtreecommitdiffstats
path: root/fs/buffer.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2024-07-10 21:45:32 +0200
committerChristian Brauner <brauner@kernel.org>2024-08-07 11:32:02 +0200
commita225800f322a3d6cc8b8b6c7dc4d5281f2f5375b (patch)
tree082609910e16ec2ff5e1b3c08d34b26240e7fcd6 /fs/buffer.c
parentvboxsf: Use a folio in vboxsf_write_end() (diff)
downloadlinux-a225800f322a3d6cc8b8b6c7dc4d5281f2f5375b.tar.xz
linux-a225800f322a3d6cc8b8b6c7dc4d5281f2f5375b.zip
fs: Convert aops->write_end to take a folio
Most callers have a folio, and most implementations operate on a folio, so remove the conversion from folio->page->folio to fit through this interface. Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/buffer.c')
-rw-r--r--fs/buffer.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index acba3dfe55d8..1a0f2f65e890 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -2280,9 +2280,8 @@ EXPORT_SYMBOL(block_write_end);
int generic_write_end(struct file *file, struct address_space *mapping,
loff_t pos, unsigned len, unsigned copied,
- struct page *page, void *fsdata)
+ struct folio *folio, void *fsdata)
{
- struct folio *folio = page_folio(page);
struct inode *inode = mapping->host;
loff_t old_size = inode->i_size;
bool i_size_changed = false;
@@ -2480,7 +2479,7 @@ int generic_cont_expand_simple(struct inode *inode, loff_t size)
if (err)
goto out;
- err = aops->write_end(NULL, mapping, size, 0, 0, page, fsdata);
+ err = aops->write_end(NULL, mapping, size, 0, 0, page_folio(page), fsdata);
BUG_ON(err > 0);
out:
@@ -2518,7 +2517,7 @@ static int cont_expand_zero(struct file *file, struct address_space *mapping,
goto out;
zero_user(page, zerofrom, len);
err = aops->write_end(file, mapping, curpos, len, len,
- page, fsdata);
+ page_folio(page), fsdata);
if (err < 0)
goto out;
BUG_ON(err != len);
@@ -2551,7 +2550,7 @@ static int cont_expand_zero(struct file *file, struct address_space *mapping,
goto out;
zero_user(page, zerofrom, len);
err = aops->write_end(file, mapping, curpos, len, len,
- page, fsdata);
+ page_folio(page), fsdata);
if (err < 0)
goto out;
BUG_ON(err != len);