summaryrefslogtreecommitdiff
path: root/mm/huge_memory.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2023-08-24 15:25:56 -0700
committerAndrew Morton <akpm@linux-foundation.org>2023-08-24 15:25:56 -0700
commitfcbc329fa39ef261ba9072c56c63563423bff798 (patch)
tree2be4883f0089822d4436a8e6a5ba9032f9a025f5 /mm/huge_memory.c
parenta644b0abbfe1d7cf775082cafdcc7b5f3c35becf (diff)
parente5548f85b4527c4c803b7eae7887c10bf8f90c97 (diff)
merge mm-hotfixes-stable into mm-stable to pick up depended-upon changes
Diffstat (limited to 'mm/huge_memory.c')
-rw-r--r--mm/huge_memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 213bb1e33830..cb4432792b88 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -1607,7 +1607,7 @@ bool madvise_free_huge_pmd(struct mmu_gather *tlb, struct vm_area_struct *vma,
* If other processes are mapping this folio, we couldn't discard
* the folio unless they all do MADV_FREE so let's skip the folio.
*/
- if (folio_mapcount(folio) != 1)
+ if (folio_estimated_sharers(folio) != 1)
goto out;
if (!folio_trylock(folio))