mm-simplify-folio_expected_ref_count.patch removed from -mm tree
The quilt patch titled
Subject: mm: simplify folio_expected_ref_count()
has been removed from the -mm tree. Its filename was
mm-simplify-folio_expected_ref_count.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: David Hildenbrand <[email protected]>
Subject: mm: simplify folio_expected_ref_count()
Date: Fri, 4 Jul 2025 12:25:19 +0200
Now that PAGE_MAPPING_MOVABLE is gone, we can simplify and rely on the folio_test_anon() test only.
... but staring at the users, this function should never even have been called on movable_ops pages. E.g.,
* __buffer_migrate_folio() does not make sense for them
* folio_migrate_mapping() does not make sense for them
* migrate_huge_page_move_mapping() does not make sense for them
* __migrate_folio() does not make sense for them
* ... and khugepaged should never stumble over them
Let's simply refuse typed pages (which includes slab) except hugetlb, and WARN.
---
include/linux/mm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/mm.h renamed from include/linux/mm.h~mm-simplify-folio_expected_ref_count +2 -2
@@ -2167,13 +2167,13 @@ static inline int folio_expected_ref_couconst int order =folio_order (folio);int ref_count =0 ; -if (WARN_ON_ONCE (folio_test_slab (folio))) +if (WARN_ON_ONCE (page_has_type (&folio->page) && !folio_test_hugetlb (folio)))return 0 ;if (folio_test_anon (folio)) {/* One reference per page from the swapcache. */ ref_count +=folio_test_swapcache (folio) << order; - }else if (!((unsigned long )folio->mapping &PAGE_MAPPING_FLAGS )) { + }else {/* One reference per page from the pagecache. */ ref_count += !!folio->mapping << order;/* One reference from PG_private. */
_
Patches currently in -mm which might be from [email protected] are
mm-convert-fpb_ignore_-into-fpb_respect_.patch mm-smaller-folio_pte_batch-improvements.patch mm-split-folio_pte_batch-into-folio_pte_batch-and-folio_pte_batch_flags.patch mm-remove-boolean-output-parameters-from-folio_pte_batch_ext.patch mm-memory-introduce-is_huge_zero_pfn-and-use-it-in-vm_normal_page_pmd.patch