Skip to contentSkip to conversation

mm-swap_statec-optimize-the-code-in-clear_shadow_from_swap_cache.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Mar 17, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/swap_state.c: optimize the code in clear_shadow_from_swap_cache()
has been removed from the -mm tree. Its filename was
mm-swap_statec-optimize-the-code-in-clear_shadow_from_swap_cache.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: Baoquan He <[email protected]>
Subject: mm/swap_state.c: optimize the code in clear_shadow_from_swap_cache()
Date: Wed, 5 Feb 2025 17:27:11 +0800

Use ALIGN to achieve the same effect and simplify the code.

---

 mm/swap_state.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
mm/swap_state.c renamed from mm/swap_state.c~mm-swap_statec-optimize-the-code-in-clear_shadow_from_swap_cache +1 -3
@@ -270,9 +270,7 @@ void clear_shadow_from_swap_cache(int ty
 		xa_unlock_irq(&address_space->i_pages);
 
 		/* search the next swapcache until we meet end */
-		curr >>= SWAP_ADDRESS_SPACE_SHIFT;
-		curr++;
-		curr <<= SWAP_ADDRESS_SPACE_SHIFT;
+		curr = ALIGN((curr + 1), SWAP_ADDRESS_SPACE_PAGES);
 		if (curr > end)
 			break;
 	}

_

Patches currently in -mm which might be from [email protected] are