aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/gup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/mm/gup.c')
-rw-r--r--arch/x86/mm/gup.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/mm/gup.c b/arch/x86/mm/gup.c
index dbe34b931374..3b5032a62b0f 100644
--- a/arch/x86/mm/gup.c
+++ b/arch/x86/mm/gup.c
@@ -114,8 +114,9 @@ static inline void get_huge_page_tail(struct page *page)
114 * __split_huge_page_refcount() cannot run 114 * __split_huge_page_refcount() cannot run
115 * from under us. 115 * from under us.
116 */ 116 */
117 VM_BUG_ON(atomic_read(&page->_count) < 0); 117 VM_BUG_ON(page_mapcount(page) < 0);
118 atomic_inc(&page->_count); 118 VM_BUG_ON(atomic_read(&page->_count) != 0);
119 atomic_inc(&page->_mapcount);
119} 120}
120 121
121static noinline int gup_huge_pmd(pmd_t pmd, unsigned long addr, 122static noinline int gup_huge_pmd(pmd_t pmd, unsigned long addr,