提交 af89fa39 编写于 作者: J Jovi Zhang 提交者: Ralf Baechle

MIPS: mm: Add compound tail page _mapcount when mapped

See commit b6999b19 which did the same modification for x86's mm/gup,

Quote from commit b6999b19:
    "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: NJovi 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: NRalf Baechle <ralf@linux-mips.org>
上级 2bd40827
...@@ -152,6 +152,8 @@ static int gup_huge_pud(pud_t pud, unsigned long addr, unsigned long end, ...@@ -152,6 +152,8 @@ static int gup_huge_pud(pud_t pud, unsigned long addr, unsigned long end,
do { do {
VM_BUG_ON(compound_head(page) != head); VM_BUG_ON(compound_head(page) != head);
pages[*nr] = page; pages[*nr] = page;
if (PageTail(page))
get_huge_page_tail(page);
(*nr)++; (*nr)++;
page++; page++;
refs++; refs++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册