]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ubifs: stop using write_cache_pages
authorChristoph Hellwig <hch@lst.de>
Fri, 11 Jul 2025 08:11:16 +0000 (10:11 +0200)
committerRichard Weinberger <richard@nod.at>
Thu, 24 Jul 2025 20:23:14 +0000 (22:23 +0200)
Stop using the obsolete write_cache_pages and use writeback_iter directly.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
fs/ubifs/file.c

index bf311c38d9a898364541f1d121f7dafd361d9986..d52181f533ac1ffa70ce78ac49ba7c761a2a4d4a 100644 (file)
@@ -977,8 +977,7 @@ static int do_writepage(struct folio *folio, size_t 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 folio *folio, struct writeback_control *wbc,
-               void *data)
+static int ubifs_writepage(struct folio *folio, struct writeback_control *wbc)
 {
        struct inode *inode = folio->mapping->host;
        struct ubifs_info *c = inode->i_sb->s_fs_info;
@@ -1050,7 +1049,12 @@ out_unlock:
 static int ubifs_writepages(struct address_space *mapping,
                struct writeback_control *wbc)
 {
-       return write_cache_pages(mapping, wbc, ubifs_writepage, NULL);
+       struct folio *folio = NULL;
+       int error;
+
+       while ((folio = writeback_iter(mapping, wbc, folio, &error)))
+               error = ubifs_writepage(folio, wbc);
+       return error;
 }
 
 /**