diff options
| author | Dev Jain <dev.jain@arm.com> | 2026-08-31 08:28:47 +0000 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-10-06 17:39:19 -0700 |
| commit | 39580da0aa8dcfc033c5dd724eb3debdc542d17a (patch) | |
| tree | 23ad582dec7f09d8841253d8c6fb6722cb48b51e | |
| parent | 11bb36dbdf71577c1ba6519a0e4b10247ef92652 (diff) | |
mm/rmap: remove stale hugetlb check in try_to_unmap_one
Post commit d4ec5572825a ("mm/rmap: add
try_to_unmap_poisoned_hugetlb_one") try_to_unmap_one() cannot be called
with a hugetlb folio. Therefore remove the folio_test_hugetlb() check.
Link: https://lore.kernel.org/20260831082849.3573957-1-dev.jain@arm.com
Signed-off-by: Dev Jain <dev.jain@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
Reviewed-by: Lance Yang <lance.yang@linux.dev>
Reviewed-by: Kunwu Chan <kunwu.chan@gmail.com>
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Cc: Harry Yoo <harry@kernel.org>
Cc: Jann Horn <jannh@google.com>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Rik van Riel <riel@surriel.com>
Cc: Vlastimil Babka <vbabka@kernel.org>
| -rw-r--r-- | mm/rmap.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/mm/rmap.c b/mm/rmap.c index 3c67ad0e9562..0a3952706faf 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -2301,11 +2301,8 @@ static bool try_to_unmap_one(struct folio *folio, struct vm_area_struct *vma, VM_BUG_ON_FOLIO(!pvmw.pte, folio); address = pvmw.address; - if (folio_test_hugetlb(folio)) { - pteval = huge_ptep_get(mm, address, pvmw.pte); - } else { - pteval = ptep_get(pvmw.pte); - } + pteval = ptep_get(pvmw.pte); + if (likely(pte_present(pteval))) { pfn = pte_pfn(pteval); } else { |
