summaryrefslogtreecommitdiff
path: root/fs/vboxsf
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2024-07-10 15:45:32 -0400
committerChristian Brauner <brauner@kernel.org>2024-08-07 11:32:02 +0200
commita225800f322a3d6cc8b8b6c7dc4d5281f2f5375b (patch)
tree082609910e16ec2ff5e1b3c08d34b26240e7fcd6 /fs/vboxsf
parent3e5d37c5f98a06ee68a5c3e2784d4a4420e9d227 (diff)
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/vboxsf')
-rw-r--r--fs/vboxsf/file.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/vboxsf/file.c b/fs/vboxsf/file.c
index 029f106d56d9..b780deb81b02 100644
--- a/fs/vboxsf/file.c
+++ b/fs/vboxsf/file.c
@@ -300,9 +300,8 @@ static int vboxsf_writepage(struct page *page, struct writeback_control *wbc)
static int vboxsf_write_end(struct file *file, struct address_space *mapping,
loff_t pos, unsigned int len, unsigned int copied,
- struct page *page, void *fsdata)
+ struct folio *folio, void *fsdata)
{
- struct folio *folio = page_folio(page);
struct inode *inode = mapping->host;
struct vboxsf_handle *sf_handle = file->private_data;
size_t from = offset_in_folio(folio, pos);
@@ -314,10 +313,10 @@ static int vboxsf_write_end(struct file *file, struct address_space *mapping,
if (!folio_test_uptodate(folio) && copied < len)
folio_zero_range(folio, from + copied, len - copied);
- buf = kmap(page);
+ buf = kmap(&folio->page);
err = vboxsf_write(sf_handle->root, sf_handle->handle,
pos, &nwritten, buf + from);
- kunmap(page);
+ kunmap(&folio->page);
if (err) {
nwritten = 0;