All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged mm-stable] mm-swap-move-setup_swap_clusters_info-after-swp_solidstate-initialization.patch removed from -mm tree
@ 2026-10-09  5:58 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-10-09  5:58 UTC (permalink / raw)
  To: mm-commits, youngjun.park, nphamcs, luizcap, kasong, chrisl,
	baoquan.he, baohua, shikemeng, akpm


The quilt patch titled
     Subject: mm, swap: move setup_swap_clusters_info() after SWP_SOLIDSTATE initialization
has been removed from the -mm tree.  Its filename was
     mm-swap-move-setup_swap_clusters_info-after-swp_solidstate-initialization.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: Kemeng Shi <shikemeng@huaweicloud.com>
Subject: mm, swap: move setup_swap_clusters_info() after SWP_SOLIDSTATE initialization
Date: Mon, 7 Sep 2026 17:13:54 +0800

In setup_swap_clusters_info(), SWP_SOLIDSTATE is used to decide
global_cluster allocation.  Move setup_swap_clusters_info() after
SWP_SOLIDSTATE initialization to avoid unneeded global_cluster allocation.

Link: https://lore.kernel.org/20260907091356.53026-3-shikemeng@huaweicloud.com
Fixes: 451c6326105b ("mm, swap: clean up swapon process and locking")
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Luiz Capitulino <luizcap@redhat.com>
Acked-by: Kairui Song <kasong@tencent.com>
Cc: Baoquan He <baoquan.he@linux.dev>
Cc: Barry Song <baohua@kernel.org>
Cc: Chris Li <chrisl@kernel.org>
Cc: Nhat Pham <nphamcs@gmail.com>
Cc: Youngjun Park <youngjun.park@lge.com>
---

 mm/swapfile.c |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

--- a/mm/swapfile.c~mm-swap-move-setup_swap_clusters_info-after-swp_solidstate-initialization
+++ a/mm/swapfile.c
@@ -3763,11 +3763,6 @@ SYSCALL_DEFINE2(swapon, const char __use
 
 	maxpages = si->max;
 
-	/* Set up the swap cluster info */
-	error = setup_swap_clusters_info(si, swap_header, maxpages);
-	if (error)
-		goto bad_swap_unlock_inode;
-
 	if (si->bdev && bdev_stable_writes(si->bdev))
 		si->flags |= SWP_STABLE_WRITES;
 
@@ -3781,6 +3776,14 @@ SYSCALL_DEFINE2(swapon, const char __use
 		inced_nr_rotate_swap = true;
 	}
 
+	/*
+	 * Set up the swap cluster info after SWP_ flags handling as
+	 * setup_swap_clusters_info() checks SWP_SOLIDSTATE.
+	 */
+	error = setup_swap_clusters_info(si, swap_header, maxpages);
+	if (error)
+		goto bad_swap_unlock_inode;
+
 	if ((swap_flags & SWAP_FLAG_DISCARD) &&
 	    si->bdev && bdev_max_discard_sectors(si->bdev)) {
 		/*
_

Patches currently in -mm which might be from shikemeng@huaweicloud.com are



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

only message in thread, other threads:[~2026-10-09  5:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-09  5:58 [merged mm-stable] mm-swap-move-setup_swap_clusters_info-after-swp_solidstate-initialization.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.