Skip to content

Commit 99dbb2a

Browse files
Christoph Hellwigrichardweinberger
authored andcommitted
ubifs: stop using write_cache_pages
Stop using the obsolete write_cache_pages and use writeback_iter directly. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Zhihao Cheng <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent ca7be9c commit 99dbb2a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

fs/ubifs/file.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -977,8 +977,7 @@ static int do_writepage(struct folio *folio, size_t len)
977977
* on the page lock and it would not write the truncated inode node to the
978978
* journal before we have finished.
979979
*/
980-
static int ubifs_writepage(struct folio *folio, struct writeback_control *wbc,
981-
void *data)
980+
static int ubifs_writepage(struct folio *folio, struct writeback_control *wbc)
982981
{
983982
struct inode *inode = folio->mapping->host;
984983
struct ubifs_info *c = inode->i_sb->s_fs_info;
@@ -1050,7 +1049,12 @@ static int ubifs_writepage(struct folio *folio, struct writeback_control *wbc,
10501049
static int ubifs_writepages(struct address_space *mapping,
10511050
struct writeback_control *wbc)
10521051
{
1053-
return write_cache_pages(mapping, wbc, ubifs_writepage, NULL);
1052+
struct folio *folio = NULL;
1053+
int error;
1054+
1055+
while ((folio = writeback_iter(mapping, wbc, folio, &error)))
1056+
error = ubifs_writepage(folio, wbc);
1057+
return error;
10541058
}
10551059

10561060
/**

0 commit comments

Comments
 (0)