mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* + mm-shmem-use-folio-for-shmem_partial_swap_usage.patch added to mm-new branch
@ 2025-08-27  2:52 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-08-27  2:52 UTC (permalink / raw)
  To: mm-commits, hughd, baolin.wang, akpm


The patch titled
     Subject: mm: shmem: use 'folio' for shmem_partial_swap_usage()
has been added to the -mm mm-new branch.  Its filename is
     mm-shmem-use-folio-for-shmem_partial_swap_usage.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-shmem-use-folio-for-shmem_partial_swap_usage.patch

This patch will later appear in the mm-new branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Note, mm-new is a provisional staging ground for work-in-progress
patches, and acceptance into mm-new is a notification for others take
notice and to finish up reviews.  Please do not hesitate to respond to
review feedback and post updated versions to replace or incrementally
fixup patches in mm-new.

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: Baolin Wang <baolin.wang@linux.alibaba.com>
Subject: mm: shmem: use 'folio' for shmem_partial_swap_usage()
Date: Tue, 26 Aug 2025 17:35:54 +0800

It is more straightforward to use the term `folio'. No functional changes.

Link: https://lkml.kernel.org/r/a2d39608d99cba1130cacd9cffbafc6949193c08.1756200587.git.baolin.wang@linux.alibaba.com
Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/shmem.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/mm/shmem.c~mm-shmem-use-folio-for-shmem_partial_swap_usage
+++ a/mm/shmem.c
@@ -1006,15 +1006,15 @@ unsigned long shmem_partial_swap_usage(s
 						pgoff_t start, pgoff_t end)
 {
 	XA_STATE(xas, &mapping->i_pages, start);
-	struct page *page;
+	struct folio *folio;
 	unsigned long swapped = 0;
 	unsigned long max = end - 1;
 
 	rcu_read_lock();
-	xas_for_each(&xas, page, max) {
-		if (xas_retry(&xas, page))
+	xas_for_each(&xas, folio, max) {
+		if (xas_retry(&xas, folio))
 			continue;
-		if (xa_is_value(page))
+		if (xa_is_value(folio))
 			swapped += 1 << xas_get_order(&xas);
 		if (xas.xa_index == max)
 			break;
_

Patches currently in -mm which might be from baolin.wang@linux.alibaba.com are

mm-shmem-use-folio-for-shmem_partial_swap_usage.patch
mm-shmem-drop-the-unnecessary-folio_nr_pages.patch


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

only message in thread, other threads:[~2025-08-27  2:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-27  2:52 + mm-shmem-use-folio-for-shmem_partial_swap_usage.patch added to mm-new branch Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).