All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged mm-stable] swap-convert-swap_writepage-to-use-a-folio.patch removed from -mm tree
@ 2022-10-03 21:05 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-10-03 21:05 UTC (permalink / raw)
  To: mm-commits, willy, akpm


The quilt patch titled
     Subject: swap: convert swap_writepage() to use a folio
has been removed from the -mm tree.  Its filename was
     swap-convert-swap_writepage-to-use-a-folio.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Subject: swap: convert swap_writepage() to use a folio
Date: Fri, 2 Sep 2022 20:46:36 +0100

Removes many calls to compound_head().

Link: https://lkml.kernel.org/r/20220902194653.1739778-41-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/page_io.c |   21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

--- a/mm/page_io.c~swap-convert-swap_writepage-to-use-a-folio
+++ a/mm/page_io.c
@@ -180,29 +180,30 @@ bad_bmap:
  */
 int swap_writepage(struct page *page, struct writeback_control *wbc)
 {
+	struct folio *folio = page_folio(page);
 	int ret = 0;
 
-	if (try_to_free_swap(page)) {
-		unlock_page(page);
+	if (folio_free_swap(folio)) {
+		folio_unlock(folio);
 		goto out;
 	}
 	/*
 	 * Arch code may have to preserve more data than just the page
 	 * contents, e.g. memory tags.
 	 */
-	ret = arch_prepare_to_swap(page);
+	ret = arch_prepare_to_swap(&folio->page);
 	if (ret) {
-		set_page_dirty(page);
-		unlock_page(page);
+		folio_mark_dirty(folio);
+		folio_unlock(folio);
 		goto out;
 	}
-	if (frontswap_store(page) == 0) {
-		set_page_writeback(page);
-		unlock_page(page);
-		end_page_writeback(page);
+	if (frontswap_store(&folio->page) == 0) {
+		folio_start_writeback(folio);
+		folio_unlock(folio);
+		folio_end_writeback(folio);
 		goto out;
 	}
-	ret = __swap_writepage(page, wbc);
+	ret = __swap_writepage(&folio->page, wbc);
 out:
 	return ret;
 }
_

Patches currently in -mm which might be from willy@infradead.org are



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-03 21:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-03 21:05 [merged mm-stable] swap-convert-swap_writepage-to-use-a-folio.patch removed from -mm tree Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.