aboutsummaryrefslogtreecommitdiff
path: root/fs/ubifs
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle)2024-01-24 17:52:45 +0000
committerRichard Weinberger2024-02-25 21:07:59 +0100
commit0df030d082d5b226984733b2e7386fa9760a7ca1 (patch)
tree54b6e44ff1f6c96e1742397d7a0cc3acc52bd02e /fs/ubifs
parent723012cab779eee8228376754e22c6594229bf8f (diff)
ubifs: Convert from writepage to writepages
This is a simplistic conversion to separate out any effects of no longer having a writepage method. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/ubifs')
-rw-r--r--fs/ubifs/file.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c
index d0694b83dd02..2022a31006df 100644
--- a/fs/ubifs/file.c
+++ b/fs/ubifs/file.c
@@ -1001,8 +1001,10 @@ static int do_writepage(struct page *page, int len)
* on the page lock and it would not write the truncated inode node to the
* journal before we have finished.
*/
-static int ubifs_writepage(struct page *page, struct writeback_control *wbc)
+static int ubifs_writepage(struct folio *folio, struct writeback_control *wbc,
+ void *data)
{
+ struct page *page = &folio->page;
struct inode *inode = page->mapping->host;
struct ubifs_info *c = inode->i_sb->s_fs_info;
struct ubifs_inode *ui = ubifs_inode(inode);
@@ -1074,6 +1076,12 @@ out_unlock:
return err;
}
+static int ubifs_writepages(struct address_space *mapping,
+ struct writeback_control *wbc)
+{
+ return write_cache_pages(mapping, wbc, ubifs_writepage, NULL);
+}
+
/**
* do_attr_changes - change inode attributes.
* @inode: inode to change attributes for
@@ -1643,7 +1651,7 @@ static int ubifs_symlink_getattr(struct mnt_idmap *idmap,
const struct address_space_operations ubifs_file_address_operations = {
.read_folio = ubifs_read_folio,
- .writepage = ubifs_writepage,
+ .writepages = ubifs_writepages,
.write_begin = ubifs_write_begin,
.write_end = ubifs_write_end,
.invalidate_folio = ubifs_invalidate_folio,