* [merged mm-stable] shmem-convert-shmem_replace_page-to-shmem_replace_folio.patch removed from -mm tree
@ 2022-10-03 21:04 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-10-03 21:04 UTC (permalink / raw)
To: mm-commits, willy, akpm
The quilt patch titled
Subject: shmem: convert shmem_replace_page() to shmem_replace_folio()
has been removed from the -mm tree. Its filename was
shmem-convert-shmem_replace_page-to-shmem_replace_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: shmem: convert shmem_replace_page() to shmem_replace_folio()
Date: Fri, 2 Sep 2022 20:46:14 +0100
The caller has a folio, so convert the calling convention and rename the
function.
Link: https://lkml.kernel.org/r/20220902194653.1739778-19-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/shmem.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
--- a/mm/shmem.c~shmem-convert-shmem_replace_page-to-shmem_replace_folio
+++ a/mm/shmem.c
@@ -1608,7 +1608,7 @@ static bool shmem_should_replace_folio(s
return folio_zonenum(folio) > gfp_zone(gfp);
}
-static int shmem_replace_page(struct page **pagep, gfp_t gfp,
+static int shmem_replace_folio(struct folio **foliop, gfp_t gfp,
struct shmem_inode_info *info, pgoff_t index)
{
struct folio *old, *new;
@@ -1617,7 +1617,7 @@ static int shmem_replace_page(struct pag
pgoff_t swap_index;
int error;
- old = page_folio(*pagep);
+ old = *foliop;
entry = folio_swap_entry(old);
swap_index = swp_offset(entry);
swap_mapping = swap_address_space(entry);
@@ -1666,7 +1666,7 @@ static int shmem_replace_page(struct pag
old = new;
} else {
folio_add_lru(new);
- *pagep = &new->page;
+ *foliop = new;
}
folio_clear_swapcache(old);
@@ -1772,8 +1772,7 @@ static int shmem_swapin_folio(struct ino
arch_swap_restore(swap, folio);
if (shmem_should_replace_folio(folio, gfp)) {
- error = shmem_replace_page(&page, gfp, info, index);
- folio = page_folio(page);
+ error = shmem_replace_folio(&folio, gfp, info, index);
if (error)
goto failed;
}
_
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:05 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:04 [merged mm-stable] shmem-convert-shmem_replace_page-to-shmem_replace_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.