Skip to content

Commit

Permalink
MIPS: mm: Add compound tail page _mapcount when mapped
Browse files Browse the repository at this point in the history
See commit b6999b1 which did the same modification for x86's mm/gup,

Quote from commit b6999b1:
    "If compound pages are used and the page is a
    tail page, gup_huge_pmd() increases _mapcount to record tail page are
    mapped while gup_huge_pud does not do that."

[ralf@linux-mips.org: fixed rejects caused by the original patch getting
linewrapped.]

Signed-off-by: Jovi Zhang <boojovi@gmail.com>
Cc: Youquan Song <youquan.song@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: <stable@vger.kernel.org>
Patchwork: https://patchwork.linux-mips.org/patch/4291/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Jovi Zhang authored and Ralf Baechle committed Aug 27, 2012
1 parent 2bd4082 commit af89fa3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/mips/mm/gup.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ static int gup_huge_pud(pud_t pud, unsigned long addr, unsigned long end,
do {
VM_BUG_ON(compound_head(page) != head);
pages[*nr] = page;
if (PageTail(page))
get_huge_page_tail(page);
(*nr)++;
page++;
refs++;
Expand Down

0 comments on commit af89fa3

Please sign in to comment.