summaryrefslogtreecommitdiff
path: root/fs/fuse
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2024-09-30 09:45:10 -0400
committerMiklos Szeredi <mszeredi@redhat.com>2024-10-25 17:05:49 +0200
commit785d06afc840922cced0c4e90f99209210dd6bd9 (patch)
treeed6ee19c5faaa222826120f87725eade65c83f63 /fs/fuse
parent3eab9d7bc2f4ae7f3f9c9c7852ff61600df79856 (diff)
fuse: convert fuse_send_write_pages to use folios
Convert this to grab the folio from the fuse_args_pages and use the appropriate folio related functions. Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Joanne Koong <joannelkoong@gmail.com> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse')
-rw-r--r--fs/fuse/file.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 2e7ecbf8e427..be6d07751ee5 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1175,23 +1175,23 @@ static ssize_t fuse_send_write_pages(struct fuse_io_args *ia,
offset = ap->descs[0].offset;
count = ia->write.out.size;
for (i = 0; i < ap->num_pages; i++) {
- struct page *page = ap->pages[i];
+ struct folio *folio = page_folio(ap->pages[i]);
if (err) {
- ClearPageUptodate(page);
+ folio_clear_uptodate(folio);
} else {
- if (count >= PAGE_SIZE - offset)
- count -= PAGE_SIZE - offset;
+ if (count >= folio_size(folio) - offset)
+ count -= folio_size(folio) - offset;
else {
if (short_write)
- ClearPageUptodate(page);
+ folio_clear_uptodate(folio);
count = 0;
}
offset = 0;
}
if (ia->write.page_locked && (i == ap->num_pages - 1))
- unlock_page(page);
- put_page(page);
+ folio_unlock(folio);
+ folio_put(folio);
}
return err;