Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755804Ab2HVDCh (ORCPT ); Tue, 21 Aug 2012 23:02:37 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:58457 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752369Ab2HVDCf (ORCPT ); Tue, 21 Aug 2012 23:02:35 -0400 MIME-Version: 1.0 Date: Wed, 22 Aug 2012 11:02:34 +0800 Message-ID: Subject: [PATCH] MIPS/mm: add compound tail page _mapcount when mapped From: Jovi Zhang To: Ralf Baechle , Andrew Morton , Andrea Arcangeli , linux-mips@linux-mips.org, Youquan Song , Andi Kleen , LKML , stable@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1376 Lines: 42 >From 3dc19ea2b535719d0b4177f17bbbff9cbf257b23 Mon Sep 17 00:00:00 2001 From: Jovi Zhang Date: Wed, 22 Aug 2012 10:34:08 +0800 Subject: [PATCH] MIPS/mm: add compound tail page _mapcount when mapped see commit b6999b191 which target for x86 mm/gup, let it align with mips architecture. 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." Signed-off-by: Jovi Zhang Cc: Youquan Song Cc: Andi Kleen Cc: --- arch/mips/mm/gup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/mips/mm/gup.c b/arch/mips/mm/gup.c index 33aadbc..dcfd573 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, do { VM_BUG_ON(compound_head(page) != head); pages[*nr] = page; + if (PageTail(page)) + get_huge_page_tail(page); (*nr)++; page++; refs++; -- 1.7.9.7 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/