diff --git a/mm/rmap.c b/mm/rmap.c
index a3c99ac63155..2b19bb92eda5 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -1406,25 +1406,26 @@ void folio_add_anon_rmap_pmd(struct folio *folio, struct page *page,
* This means the inc-and-test can be bypassed.
* The folio does not have to be locked.
*
- * If the folio is pmd-mappable, it is accounted as a THP. As the folio
- * is new, it's assumed to be mapped exclusively by a single process.
+ * If the folio is pmd-mappable, it is accounted as a THP.
*/
void folio_add_new_anon_rmap(struct folio *folio, struct vm_area_struct *vma,
- unsigned long address)
+ unsigned long address, rmap_t flags)
{
int nr = folio_nr_pages(folio);
int nr_pmdmapped = 0;
+ bool exclusive = flags & RMAP_EXCLUSIVE;