ttm: Call shmem_writeout() from ttm_backup_backup_page()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 2 Apr 2025 15:00:01 +0000 (16:00 +0100)
committerChristian Brauner <brauner@kernel.org>
Mon, 7 Apr 2025 07:36:49 +0000 (09:36 +0200)
The ->writepage operation is being removed.  Since this function
exclusively deals with shmem folios, we can call shmem_writeout()
to write it.

Signed-off-by: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Link: https://lore.kernel.org/r/20250402150005.2309458-8-willy@infradead.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
drivers/gpu/drm/ttm/ttm_backup.c

index 93c007f18855d2b941ab63dc795354e83e5256c9..0d5718466ffc202d39c9f442e2ea02b9e37bf02a 100644 (file)
@@ -136,13 +136,13 @@ ttm_backup_backup_page(struct ttm_backup *backup, struct page *page,
                        .for_reclaim = 1,
                };
                folio_set_reclaim(to_folio);
-               ret = mapping->a_ops->writepage(folio_file_page(to_folio, idx), &wbc);
+               ret = shmem_writeout(to_folio, &wbc);
                if (!folio_test_writeback(to_folio))
                        folio_clear_reclaim(to_folio);
                /*
-                * If writepage succeeds, it unlocks the folio.
-                * writepage() errors are otherwise dropped, since writepage()
-                * is only best effort here.
+                * If writeout succeeds, it unlocks the folio.  errors
+                * are otherwise dropped, since writeout is only best
+                * effort here.
                 */
                if (ret)
                        folio_unlock(to_folio);