forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-02-20 ea08eeccae9297f7aabd2ef7f0c2517ac4549acc
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));