]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm/huge_memory: remove redundant split_order != new_order check in uniform_split
authorWei Yang <richard.weiyang@gmail.com>
Tue, 14 Oct 2025 13:46:06 +0000 (13:46 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 15 Oct 2025 04:28:55 +0000 (21:28 -0700)
The uniform splitting logic is designed so that the @split_order variable
starts at the target @new_order and subsequently decreases with each
iteration.

Given that both @split_order and @new_order are integers and the splitting
process only ever targets the @new_order for a uniform split, the
condition where split_order != new_order will not logically occur within
the expected execution path.

Removes the check for this non-existent case, simplifying the code.

Link: https://lkml.kernel.org/r/20251014134606.22543-6-richard.weiyang@gmail.com
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Cc: Zi Yan <ziy@nvidia.com>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Barry Song <baohua@kernel.org>
Cc: David Hildenbrand <david@redhat.com>
Cc: Dev Jain <dev.jain@arm.com>
Cc: Lance Yang <lance.yang@linux.dev>
Cc: Liam Howlett <liam.howlett@oracle.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Mariano Pache <npache@redhat.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/huge_memory.c

index cf9a6c505b335bc65197f0deb1e15d4cd61449c2..46ed647f85c1416635f95a43a82714908026709e 100644 (file)
@@ -3545,8 +3545,6 @@ static int __split_unmapped_folio(struct folio *folio, int new_order,
                /* order-1 anonymous folio is not supported */
                if (is_anon && split_order == 1)
                        continue;
-               if (uniform_split && split_order != new_order)
-                       continue;
 
                if (mapping) {
                        /*