Unverified Commit fe75adff authored by Matthew Wilcox (Oracle)'s avatar Matthew Wilcox (Oracle) Committed by Christian Brauner
Browse files

ttm: Call shmem_writeout() from ttm_backup_backup_page()



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: default avatar"Matthew Wilcox (Oracle)" <willy@infradead.org>
Link: https://lore.kernel.org/r/20250402150005.2309458-8-willy@infradead.org


Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent 776a853a
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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);