Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

Commit

Permalink
mm-thp-fix-debug_pagealloc-oops-in-copy_page_rep-checkpatch-fixes
Browse files Browse the repository at this point in the history
WARNING: Missing a blank line after declarations
torvalds#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
torvalds#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 <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
akpm00 authored and sfrothwell committed Jun 20, 2014
1 parent 29c6027 commit da3daec
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions mm/huge_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit da3daec

Please sign in to comment.