[PATCH v2 2/6] mm/rmap: use huge_ptep_get() in try_to_unmap_one()
David Hildenbrand (Arm)
david at kernel.org
Fri Jul 3 00:06:42 PDT 2026
>>> diff --git a/mm/rmap.c b/mm/rmap.c
>>> index 1c77d5dc06e9f..aa8a254efaecc 100644
>>> --- a/mm/rmap.c
>>> +++ b/mm/rmap.c
>>> @@ -2095,11 +2095,16 @@ static bool try_to_unmap_one(struct folio *folio, struct vm_area_struct *vma,
>>> /* Unexpected PMD-mapped THP? */
>>> VM_BUG_ON_FOLIO(!pvmw.pte, folio);
>>>
>>> - /*
>>> - * Handle PFN swap PTEs, such as device-exclusive ones, that
>>> - * actually map pages.
>>> - */
>>
>> That comment now actually belongs above the pte_present() check below.
>
> Oops I mindlessly just copied the comment.
>
> I will then rather put it in the else block which gets the pfn from the softleaf,
> that is the most appropriate.
Works for me, thanks
--
Cheers,
David
More information about the linux-arm-kernel
mailing list