aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
authorBrendan Jackman <jackmanb@google.com>2026-05-26 11:28:36 +0000
committerAndrew Morton <akpm@linux-foundation.org>2026-05-28 21:31:27 -0700
commit8f8e742a63b7b4f3c51f8d79dc31fbf16de9d016 (patch)
treed146c1d7f7076d4d40cb283e23c84111f16ee2f6 /mm
parent1aeb2103004eacb2d98cef3a49c63f883621bd9b (diff)
downloadlinux-next-history-8f8e742a63b7b4f3c51f8d79dc31fbf16de9d016.tar.gz
mm/page_alloc: remove VM_BUG_ON()s from pindex helpers
Vlastimil pointed out that the VM_BUG_ON()s have fallen out of favour, so remove them. Link: https://lore.kernel.org/20260526-page_alloc-unmapped-prep-v2-1-412f4d486115@google.com Signed-off-by: Brendan Jackman <jackmanb@google.com> Suggested-by: Vlastimil Babka (SUSE) <vbabka@kernel.org> Link: https://lore.kernel.org/all/4074a816-9e75-45a6-8141-25459bcc106b@kernel.org/ Reviewed-by: Vlastimil Babka (SUSE) <vbabka@kernel.org> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Michal Hocko <mhocko@suse.com> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Zi Yan <ziy@nvidia.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/page_alloc.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 7e3c79e79e5b8..97cb958205923 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -653,13 +653,8 @@ static inline unsigned int order_to_pindex(int migratetype, int order)
if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE)) {
bool movable = migratetype == MIGRATE_MOVABLE;
- if (order > PAGE_ALLOC_COSTLY_ORDER) {
- VM_BUG_ON(!is_pmd_order(order));
-
+ if (order > PAGE_ALLOC_COSTLY_ORDER)
return NR_LOWORDER_PCP_LISTS + movable;
- }
- } else {
- VM_BUG_ON(order > PAGE_ALLOC_COSTLY_ORDER);
}
return (MIGRATE_PCPTYPES * order) + migratetype;
@@ -672,8 +667,6 @@ static inline int pindex_to_order(unsigned int pindex)
if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE)) {
if (pindex >= NR_LOWORDER_PCP_LISTS)
order = HPAGE_PMD_ORDER;
- } else {
- VM_BUG_ON(order > PAGE_ALLOC_COSTLY_ORDER);
}
return order;