diff options
author | Jovi Zhang <bookjovi@gmail.com> | 2012-08-21 22:34:08 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2012-08-27 10:10:21 -0400 |
commit | af89fa3986b9d034a286544ab1ed95096496a2f9 (patch) | |
tree | 5fa5bc0a8bcf79625bc36488663c9092fcacbe0c | |
parent | 2bd4082776ff17a0d0d565852afb422931c2f6f2 (diff) |
MIPS: mm: Add compound tail page _mapcount when mapped
See commit b6999b191 which did the same modification for x86's mm/gup,
Quote from commit b6999b191:
"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>
-rw-r--r-- | arch/mips/mm/gup.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/mips/mm/gup.c b/arch/mips/mm/gup.c index 33aadbcf170b..dcfd573871c1 100644 --- a/arch/mips/mm/gup.c +++ b/arch/mips/mm/gup.c | |||
@@ -152,6 +152,8 @@ static int gup_huge_pud(pud_t pud, unsigned long addr, unsigned long end, | |||
152 | do { | 152 | do { |
153 | VM_BUG_ON(compound_head(page) != head); | 153 | VM_BUG_ON(compound_head(page) != head); |
154 | pages[*nr] = page; | 154 | pages[*nr] = page; |
155 | if (PageTail(page)) | ||
156 | get_huge_page_tail(page); | ||
155 | (*nr)++; | 157 | (*nr)++; |
156 | page++; | 158 | page++; |
157 | refs++; | 159 | refs++; |