Skip to content

Commit b89798e

Browse files
Christoph Hellwigkleikamp
authored andcommitted
jfs: stop using write_cache_pages
Stop using the obsolete write_cache_pages and use writeback_iter directly. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Dave Kleikamp <[email protected]>
1 parent 2d91b37 commit b89798e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

fs/jfs/jfs_metapage.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ static void metapage_write_end_io(struct bio *bio)
421421
}
422422

423423
static int metapage_write_folio(struct folio *folio,
424-
struct writeback_control *wbc, void *unused)
424+
struct writeback_control *wbc)
425425
{
426426
struct bio *bio = NULL;
427427
int block_offset; /* block offset of mp within page */
@@ -550,10 +550,12 @@ static int metapage_writepages(struct address_space *mapping,
550550
struct writeback_control *wbc)
551551
{
552552
struct blk_plug plug;
553+
struct folio *folio = NULL;
553554
int err;
554555

555556
blk_start_plug(&plug);
556-
err = write_cache_pages(mapping, wbc, metapage_write_folio, NULL);
557+
while ((folio = writeback_iter(mapping, wbc, folio, &err)))
558+
err = metapage_write_folio(folio, wbc);
557559
blk_finish_plug(&plug);
558560

559561
return err;
@@ -813,7 +815,7 @@ static int metapage_write_one(struct folio *folio)
813815

814816
if (folio_clear_dirty_for_io(folio)) {
815817
folio_get(folio);
816-
ret = metapage_write_folio(folio, &wbc, NULL);
818+
ret = metapage_write_folio(folio, &wbc);
817819
if (ret == 0)
818820
folio_wait_writeback(folio);
819821
folio_put(folio);

0 commit comments

Comments
 (0)