/*
* always: directly stall for all thp allocations
* defer: wake kswapd and fail if not immediately available
diff --git a/mm/memory.c b/mm/memory.c
index d9de6c056179..860665f4b692 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -6298,8 +6298,10 @@ static vm_fault_t __handle_mm_fault(struct
vm_area_struct *vma,
vmf.orig_pmd = pmdp_get_lockless(vmf.pmd);
if (unlikely(is_swap_pmd(vmf.orig_pmd))) {
- VM_BUG_ON(thp_migration_supported() &&
- !is_pmd_migration_entry(vmf.orig_pmd));
+ if (is_device_private_entry(
+ pmd_to_swp_entry(vmf.orig_pmd)))
Single line please.
Ack
But didn't we have a pmd helper for that?
This is a single if that handles is_swap_pmd() and then
is_device_private_entry() and is_pmd_migration_entry()
under that
I meant using
if (is_pmd_device_private_entry(vmf.orig_pmd)))
just like below we use
if (is_pmd_migration_entry(vmf.orig_pmd))
--
Cheers
David / dhildenb