Skip to content

Commit 785d06a

Browse files
josefbacikMiklos Szeredi
authored andcommitted
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) <[email protected]> Reviewed-by: Joanne Koong <[email protected]> Signed-off-by: Josef Bacik <[email protected]> Signed-off-by: Miklos Szeredi <[email protected]>
1 parent 3eab9d7 commit 785d06a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

fs/fuse/file.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,23 +1175,23 @@ static ssize_t fuse_send_write_pages(struct fuse_io_args *ia,
11751175
offset = ap->descs[0].offset;
11761176
count = ia->write.out.size;
11771177
for (i = 0; i < ap->num_pages; i++) {
1178-
struct page *page = ap->pages[i];
1178+
struct folio *folio = page_folio(ap->pages[i]);
11791179

11801180
if (err) {
1181-
ClearPageUptodate(page);
1181+
folio_clear_uptodate(folio);
11821182
} else {
1183-
if (count >= PAGE_SIZE - offset)
1184-
count -= PAGE_SIZE - offset;
1183+
if (count >= folio_size(folio) - offset)
1184+
count -= folio_size(folio) - offset;
11851185
else {
11861186
if (short_write)
1187-
ClearPageUptodate(page);
1187+
folio_clear_uptodate(folio);
11881188
count = 0;
11891189
}
11901190
offset = 0;
11911191
}
11921192
if (ia->write.page_locked && (i == ap->num_pages - 1))
1193-
unlock_page(page);
1194-
put_page(page);
1193+
folio_unlock(folio);
1194+
folio_put(folio);
11951195
}
11961196

11971197
return err;

0 commit comments

Comments
 (0)