hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/fs/proc/task_mmu.c
....@@ -774,9 +774,7 @@
774774 page = device_private_entry_to_page(swpent);
775775 }
776776 if (page) {
777
- int mapcount = page_mapcount(page);
778
-
779
- if (mapcount >= 2)
777
+ if (page_mapcount(page) >= 2 || hugetlb_pmd_shared(pte))
780778 mss->shared_hugetlb += huge_page_size(hstate_vma(vma));
781779 else
782780 mss->private_hugetlb += huge_page_size(hstate_vma(vma));