aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2023-01-31 17:25:17 -0800
committerAndrew Morton <akpm@linux-foundation.org>2023-01-31 17:25:17 -0800
commit5ab0fc155dc0cac3b74584f7bc972569b0f8a57b (patch)
treefb43458b715be3a72c872bc4ce0e7c45e6f76ccb /fs/proc
parent9a3f21fe5cb9f5654ccad7ba712d868f7de66e39 (diff)
parentac86f547ca1002aec2ef66b9e64d03f45bbbfbb9 (diff)
downloadlinux-5ab0fc155dc0cac3b74584f7bc972569b0f8a57b.tar.gz
Sync mm-stable with mm-hotfixes-stable to pick up dependent patches
Merge branch 'mm-hotfixes-stable' into mm-stable
Diffstat (limited to 'fs/proc')
-rw-r--r--fs/proc/task_mmu.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index e35a0398db63f..af1c49ae11b16 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -745,9 +745,7 @@ static int smaps_hugetlb_range(pte_t *pte, unsigned long hmask,
page = pfn_swap_entry_to_page(swpent);
}
if (page) {
- int mapcount = page_mapcount(page);
-
- if (mapcount >= 2)
+ if (page_mapcount(page) >= 2 || hugetlb_pmd_shared(pte))
mss->shared_hugetlb += huge_page_size(hstate_vma(vma));
else
mss->private_hugetlb += huge_page_size(hstate_vma(vma));