From da3daeceddb6f723fd7c3916453d99590d5fe473 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Fri, 20 Jun 2014 10:27:30 +1000 Subject: [PATCH] mm-thp-fix-debug_pagealloc-oops-in-copy_page_rep-checkpatch-fixes WARNING: Missing a blank line after declarations #46: FILE: mm/huge_memory.c:954: + struct page *endpage = page + HPAGE_PMD_NR; + atomic_add(HPAGE_PMD_NR, &page->_count); WARNING: Missing a blank line after declarations #57: FILE: mm/huge_memory.c:965: + struct page *endpage = page + HPAGE_PMD_NR; + while (page < endpage) total: 0 errors, 2 warnings, 65 lines checked ./patches/mm-thp-fix-debug_pagealloc-oops-in-copy_page_rep.patch has style problems, please review. If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. Please run checkpatch prior to sending patches Cc: Hugh Dickins Signed-off-by: Andrew Morton --- mm/huge_memory.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 623ad778e4b14e..bade35ef563b08 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -951,21 +951,25 @@ static void get_user_huge_page(struct page *page) { if (IS_ENABLED(CONFIG_DEBUG_PAGEALLOC)) { struct page *endpage = page + HPAGE_PMD_NR; + atomic_add(HPAGE_PMD_NR, &page->_count); while (++page < endpage) get_huge_page_tail(page); - } else + } else { get_page(page); + } } static void put_user_huge_page(struct page *page) { if (IS_ENABLED(CONFIG_DEBUG_PAGEALLOC)) { struct page *endpage = page + HPAGE_PMD_NR; + while (page < endpage) put_page(page++); - } else + } else { put_page(page); + } } static int do_huge_pmd_wp_page_fallback(struct mm_struct *mm,