mm-ksm-cleanup-mm_slot_entry-invocation.patch removed from -mm tree
The quilt patch titled
Subject: mm/ksm: cleanup mm_slot_entry() invocation
has been removed from the -mm tree. Its filename was
mm-ksm-cleanup-mm_slot_entry-invocation.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: Wei Yang <[email protected]>
Subject: mm/ksm: cleanup mm_slot_entry() invocation
Date: Wed, 1 Oct 2025 09:18:59 +0000
Patch series "mm_slot: following fixup for usage of mm_slot_entry()", v2.
We got some late review commits during review of "mm_slot: fix the usage of mm_slot_entry()" in [1].
This patch (of 2):
We got some late review commits during review of commit 08498be43ee6 ("mm/ksm: get mm_slot by mm_slot_entry() when slot is !NULL"). Let's reduce the indentation level and make the code easier to follow by using gotos to a new label.
---
mm/ksm.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-)
mm/ksm.c renamed from mm/ksm.c~mm-ksm-cleanup-mm_slot_entry-invocation +14 -13
@@ -2921,7 +2921,7 @@ int __ksm_enter(struct mm_struct *mm)void __ksm_exit (struct mm_struct *mm) { -struct ksm_mm_slot *mm_slot; +struct ksm_mm_slot *mm_slot =NULL ;struct mm_slot *slot;int easy_to_free =0 ;
@@ -2936,19 +2936,20 @@ void __ksm_exit(struct mm_struct *mm)spin_lock (&ksm_mmlist_lock); slot =mm_slot_lookup (mm_slots_hash, mm); -if (slot) { - mm_slot = mm_slot_entry(slot, struct ksm_mm_slot, slot); -if (ksm_scan.mm_slot != mm_slot) { -if (!mm_slot->rmap_list) { -hash_del (&slot->hash); -list_del (&slot->mm_node); - easy_to_free =1 ; - }else { -list_move (&slot->mm_node, - &ksm_scan.mm_slot->slot.mm_node); - } - } +if (!slot) + goto unlock; + mm_slot = mm_slot_entry(slot, struct ksm_mm_slot, slot); +if (ksm_scan.mm_slot == mm_slot) + goto unlock; +if (!mm_slot->rmap_list) { +hash_del (&slot->hash); +list_del (&slot->mm_node); + easy_to_free =1 ; + }else { +list_move (&slot->mm_node, + &ksm_scan.mm_slot->slot.mm_node); } +unlock:spin_unlock (&ksm_mmlist_lock);if (easy_to_free) {
_
Patches currently in -mm which might be from [email protected] are