]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - include/linux/rmap.h
mm: rework mapcount accounting to enable 4k mapping of THPs
[karo-tx-linux.git] / include / linux / rmap.h
index 038b6e704d9bf456b051ddbf29a99727725547bf..ebf3750e42b2c399db2ea034deef752da1235bdf 100644 (file)
@@ -183,9 +183,9 @@ void hugepage_add_anon_rmap(struct page *, struct vm_area_struct *,
 void hugepage_add_new_anon_rmap(struct page *, struct vm_area_struct *,
                                unsigned long);
 
-static inline void page_dup_rmap(struct page *page)
+static inline void page_dup_rmap(struct page *page, bool compound)
 {
-       atomic_inc(&page->_mapcount);
+       atomic_inc(compound ? compound_mapcount_ptr(page) : &page->_mapcount);
 }
 
 /*