Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754396AbcJZItc (ORCPT ); Wed, 26 Oct 2016 04:49:32 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:59047 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754013AbcJZItZ (ORCPT ); Wed, 26 Oct 2016 04:49:25 -0400 From: "Aneesh Kumar K.V" To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Aneesh Kumar K.V" Subject: [PATCH 1/5] mm: Use the correct page size when removing the page Date: Wed, 26 Oct 2016 14:18:35 +0530 X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161026084839.27299-1-aneesh.kumar@linux.vnet.ibm.com> References: <20161026084839.27299-1-aneesh.kumar@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16102608-0020-0000-0000-00000A1AFA4D X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00005981; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000188; SDB=6.00772924; UDB=6.00371059; IPR=6.00549750; BA=6.00004834; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00013106; XFM=3.00000011; UTC=2016-10-26 08:49:22 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16102608-0021-0000-0000-000056C0203C Message-Id: <20161026084839.27299-2-aneesh.kumar@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-10-26_01:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=3 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1610260153 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1011 Lines: 28 We are removing a pmd hugepage here. Use the correct page size. Signed-off-by: Aneesh Kumar K.V --- mm/huge_memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index cdcd25cb30fe..12c6685d4e97 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -1398,12 +1398,12 @@ int zap_huge_pmd(struct mmu_gather *tlb, struct vm_area_struct *vma, if (vma_is_dax(vma)) { spin_unlock(ptl); if (is_huge_zero_pmd(orig_pmd)) - tlb_remove_page(tlb, pmd_page(orig_pmd)); + tlb_remove_page_size(tlb, pmd_page(orig_pmd), HPAGE_PMD_SIZE); } else if (is_huge_zero_pmd(orig_pmd)) { pte_free(tlb->mm, pgtable_trans_huge_withdraw(tlb->mm, pmd)); atomic_long_dec(&tlb->mm->nr_ptes); spin_unlock(ptl); - tlb_remove_page(tlb, pmd_page(orig_pmd)); + tlb_remove_page_size(tlb, pmd_page(orig_pmd), HPAGE_PMD_SIZE); } else { struct page *page = pmd_page(orig_pmd); page_remove_rmap(page, true); -- 2.10.1