summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/fs-io-buffered.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2024-07-15 20:24:01 +0200
committerChristian Brauner <brauner@kernel.org>2024-08-07 11:33:21 +0200
commit1da86618bdce301d23e89ecce92161f9d3b3c5e7 (patch)
tree7e6d452f81d12f8b472b0a037f0d5654ea18766b /fs/bcachefs/fs-io-buffered.c
parentfs: Convert aops->write_end to take a folio (diff)
downloadlinux-1da86618bdce301d23e89ecce92161f9d3b3c5e7.tar.xz
linux-1da86618bdce301d23e89ecce92161f9d3b3c5e7.zip
fs: Convert aops->write_begin to take a folio
Convert all callers from working on a page to working on one page of a folio (support for working on an entire folio can come later). Removes a lot of folio->page->folio conversions. 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/bcachefs/fs-io-buffered.c')
-rw-r--r--fs/bcachefs/fs-io-buffered.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/bcachefs/fs-io-buffered.c b/fs/bcachefs/fs-io-buffered.c
index 46ae9ef3589a..3d410d801825 100644
--- a/fs/bcachefs/fs-io-buffered.c
+++ b/fs/bcachefs/fs-io-buffered.c
@@ -659,7 +659,7 @@ int bch2_writepages(struct address_space *mapping, struct writeback_control *wbc
int bch2_write_begin(struct file *file, struct address_space *mapping,
loff_t pos, unsigned len,
- struct page **pagep, void **fsdata)
+ struct folio **foliop, void **fsdata)
{
struct bch_inode_info *inode = to_bch_ei(mapping->host);
struct bch_fs *c = inode->v.i_sb->s_fs_info;
@@ -728,12 +728,11 @@ out:
goto err;
}
- *pagep = &folio->page;
+ *foliop = folio;
return 0;
err:
folio_unlock(folio);
folio_put(folio);
- *pagep = NULL;
err_unlock:
bch2_pagecache_add_put(inode);
kfree(res);